Skip to content

Commit 1e3e8b5

Browse files
committed
Change the type of WalReceiverWaitStart wait event from Client to IPC.
Previously the type of this wait event was Client. But while this wait event is being reported, walreceiver process is waiting for the startup process to set initial data for streaming replication. It's not waiting for any activity on a socket connected to a user application or walsender. So this commit changes the type for WalReceiverWaitStart wait event to IPC. Author: Fujii Masao Reviewed-by: Kyotaro Horiguchi Discussion: https://postgr.es/m/cdacc27c-37ff-f1a4-20e2-ce19933abfcc@oss.nttdata.com
1 parent 51893c8 commit 1e3e8b5

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

doc/src/sgml/monitoring.sgml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,11 +1171,6 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
11711171
<entry><literal>SSLOpenServer</literal></entry>
11721172
<entry>Waiting for SSL while attempting connection.</entry>
11731173
</row>
1174-
<row>
1175-
<entry><literal>WalReceiverWaitStart</literal></entry>
1176-
<entry>Waiting for startup process to send initial data for streaming
1177-
replication.</entry>
1178-
</row>
11791174
<row>
11801175
<entry><literal>WalSenderWaitForWAL</literal></entry>
11811176
<entry>Waiting for WAL to be flushed in WAL sender process.</entry>
@@ -1771,6 +1766,11 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
17711766
<entry><literal>WalrcvExit</literal></entry>
17721767
<entry>Waiting for the walreceiver to exit.</entry>
17731768
</row>
1769+
<row>
1770+
<entry><literal>WalReceiverWaitStart</literal></entry>
1771+
<entry>Waiting for startup process to send initial data for streaming
1772+
replication.</entry>
1773+
</row>
17741774
<row>
17751775
<entry><literal>XactGroupUpdate</literal></entry>
17761776
<entry>Waiting for the group leader to update transaction status at

src/backend/postmaster/pgstat.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3970,9 +3970,6 @@ pgstat_get_wait_client(WaitEventClient w)
39703970
case WAIT_EVENT_SSL_OPEN_SERVER:
39713971
event_name = "SSLOpenServer";
39723972
break;
3973-
case WAIT_EVENT_WAL_RECEIVER_WAIT_START:
3974-
event_name = "WalReceiverWaitStart";
3975-
break;
39763973
case WAIT_EVENT_WAL_SENDER_WAIT_WAL:
39773974
event_name = "WalSenderWaitForWAL";
39783975
break;
@@ -4127,6 +4124,9 @@ pgstat_get_wait_ipc(WaitEventIPC w)
41274124
case WAIT_EVENT_WALRCV_EXIT:
41284125
event_name = "WalrcvExit";
41294126
break;
4127+
case WAIT_EVENT_WAL_RECEIVER_WAIT_START:
4128+
event_name = "WalReceiverWaitStart";
4129+
break;
41304130
case WAIT_EVENT_XACT_GROUP_UPDATE:
41314131
event_name = "XactGroupUpdate";
41324132
break;

src/include/pgstat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,6 @@ typedef enum
953953
WAIT_EVENT_LIBPQWALRECEIVER_CONNECT,
954954
WAIT_EVENT_LIBPQWALRECEIVER_RECEIVE,
955955
WAIT_EVENT_SSL_OPEN_SERVER,
956-
WAIT_EVENT_WAL_RECEIVER_WAIT_START,
957956
WAIT_EVENT_WAL_SENDER_WAIT_WAL,
958957
WAIT_EVENT_WAL_SENDER_WRITE_DATA,
959958
} WaitEventClient;
@@ -1010,6 +1009,7 @@ typedef enum
10101009
WAIT_EVENT_SAFE_SNAPSHOT,
10111010
WAIT_EVENT_SYNC_REP,
10121011
WAIT_EVENT_WALRCV_EXIT,
1012+
WAIT_EVENT_WAL_RECEIVER_WAIT_START,
10131013
WAIT_EVENT_XACT_GROUP_UPDATE
10141014
} WaitEventIPC;
10151015

0 commit comments

Comments
 (0)