diff options
Diffstat (limited to 'contrib/pg_prewarm/autoprewarm.c')
| -rw-r--r-- | contrib/pg_prewarm/autoprewarm.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/contrib/pg_prewarm/autoprewarm.c b/contrib/pg_prewarm/autoprewarm.c index 13eee4a1379..ee20e9b0850 100644 --- a/contrib/pg_prewarm/autoprewarm.c +++ b/contrib/pg_prewarm/autoprewarm.c @@ -814,12 +814,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"); @@ -856,10 +855,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; |
