diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/pg_prewarm/autoprewarm.c | 6 | ||||
-rw-r--r-- | contrib/postgres_fdw/postgres_fdw.c | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/contrib/pg_prewarm/autoprewarm.c b/contrib/pg_prewarm/autoprewarm.c index b45755b3347..73485a2323c 100644 --- a/contrib/pg_prewarm/autoprewarm.c +++ b/contrib/pg_prewarm/autoprewarm.c @@ -798,12 +798,11 @@ apw_detach_shmem(int code, Datum arg) static void apw_start_leader_worker(void) { - BackgroundWorker worker; + BackgroundWorker worker = {0}; BackgroundWorkerHandle *handle; BgwHandleStatus status; pid_t pid; - MemSet(&worker, 0, sizeof(BackgroundWorker)); worker.bgw_flags = BGWORKER_SHMEM_ACCESS; worker.bgw_start_time = BgWorkerStart_ConsistentState; strcpy(worker.bgw_library_name, "pg_prewarm"); @@ -840,10 +839,9 @@ apw_start_leader_worker(void) static void apw_start_database_worker(void) { - BackgroundWorker worker; + BackgroundWorker worker = {0}; BackgroundWorkerHandle *handle; - MemSet(&worker, 0, sizeof(BackgroundWorker)); worker.bgw_flags = BGWORKER_SHMEM_ACCESS | BGWORKER_BACKEND_DATABASE_CONNECTION; worker.bgw_start_time = BgWorkerStart_ConsistentState; diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c index 263c879026e..6beae0fa37f 100644 --- a/contrib/postgres_fdw/postgres_fdw.c +++ b/contrib/postgres_fdw/postgres_fdw.c @@ -3333,7 +3333,7 @@ estimate_path_cost_size(PlannerInfo *root, { RelOptInfo *outerrel = fpinfo->outerrel; PgFdwRelationInfo *ofpinfo; - AggClauseCosts aggcosts; + AggClauseCosts aggcosts = {0}; double input_rows; int numGroupCols; double numGroups = 1; @@ -3357,7 +3357,6 @@ estimate_path_cost_size(PlannerInfo *root, input_rows = ofpinfo->rows; /* Collect statistics about aggregates for estimating costs. */ - MemSet(&aggcosts, 0, sizeof(AggClauseCosts)); if (root->parse->hasAggs) { get_agg_clause_costs(root, AGGSPLIT_SIMPLE, &aggcosts); |