Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit24aafcd

Browse files
ildusAlexander Korotkov
authored and
Alexander Korotkov
committed
Fix pg_stat_wait on replics
1 parent71a9de0 commit24aafcd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎contrib/pg_stat_wait/collector.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void
5252
AllocateCollectorMem(void)
5353
{
5454
boolfound;
55-
Sizesegsize=CollectorShmemSize();
55+
Sizesegsize=CollectorShmemSize();
5656

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

@@ -96,7 +96,7 @@ RegisterWaitsCollector(void)
9696
/* set up common data for all our workers */
9797
worker.bgw_flags=BGWORKER_SHMEM_ACCESS |
9898
BGWORKER_BACKEND_DATABASE_CONNECTION;
99-
worker.bgw_start_time=BgWorkerStart_RecoveryFinished;
99+
worker.bgw_start_time=BgWorkerStart_ConsistentState;
100100
worker.bgw_restart_time=BGW_NEVER_RESTART;
101101
worker.bgw_main=collector_main;
102102
worker.bgw_notify_pid=0;
@@ -233,6 +233,7 @@ collector_main(Datum main_arg)
233233
BackgroundWorkerUnblockSignals();
234234

235235
hdr->latch=&MyProc->procLatch;
236+
236237
CurrentResourceOwner=ResourceOwnerCreate(NULL,"pg_stat_wait collector");
237238
collector_context=AllocSetContextCreate(TopMemoryContext,
238239
"pg_stat_wait context",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp