Type of wait events WalReceiverWaitStart and WalSenderWaitForWAL

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Type of wait events WalReceiverWaitStart and WalSenderWaitForWAL
Date: 2021-03-15 18:12:54
Message-ID: cdacc27c-37ff-f1a4-20e2-ce19933abfcc@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The wait event WalReceiverWaitStart has been categorized in the type Client.
But why? Walreceiver is waiting for startup process to set the lsn and
timeline while it is reporting WalReceiverWaitStart. So its type should be IPC,
instead?

The wait event WalSenderWaitForWAL has also been categorized in the type
Client. While this wait event is being reported, logical replication walsender
is waiting for not only new WAL to be flushed but also the socket to be
readable and writeable (if there is pending data). I guess that this is why
its type is Client. But ISTM walsender is *mainly* waiting for new WAL to be
flushed by other processes during that period, so I think that it's better
to use IPC as the type of the wait event WalSenderWaitForWAL. Thought?

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Avinash Kumar 2021-03-15 18:21:33 Re: Postgres crashes at memcopy() after upgrade to PG 13.
Previous Message Mark Dilger 2021-03-15 18:11:17 Re: pg_amcheck contrib application