Skip to content

Commit

Permalink
Fix pg_stat_wait on replics
Browse files Browse the repository at this point in the history
  • Loading branch information
ildus committed Oct 20, 2015
1 parent 9f7123d commit 4c54dc0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions contrib/pg_stat_wait/collector.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void
AllocateCollectorMem(void)
{
bool found;
Size segsize= CollectorShmemSize();
Size segsize = CollectorShmemSize();

pgsw = ShmemInitStruct("pg_stat_wait", segsize, &found);

Expand Down Expand Up @@ -96,7 +96,7 @@ RegisterWaitsCollector(void)
/* set up common data for all our workers */
worker.bgw_flags = BGWORKER_SHMEM_ACCESS |
BGWORKER_BACKEND_DATABASE_CONNECTION;
worker.bgw_start_time = BgWorkerStart_RecoveryFinished;
worker.bgw_start_time = BgWorkerStart_ConsistentState;
worker.bgw_restart_time = BGW_NEVER_RESTART;
worker.bgw_main = collector_main;
worker.bgw_notify_pid = 0;
Expand Down Expand Up @@ -233,6 +233,7 @@ collector_main(Datum main_arg)
BackgroundWorkerUnblockSignals();

hdr->latch = &MyProc->procLatch;

CurrentResourceOwner = ResourceOwnerCreate(NULL, "pg_stat_wait collector");
collector_context = AllocSetContextCreate(TopMemoryContext,
"pg_stat_wait context",
Expand Down

0 comments on commit 4c54dc0

Please sign in to comment.