From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
---|---|
To: | masao(dot)fujii(at)oss(dot)nttdata(dot)com |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Type of wait events WalReceiverWaitStart and WalSenderWaitForWAL |
Date: | 2021-03-16 02:59:58 |
Message-ID: | 20210316.115958.1737028008470176828.horikyota.ntt@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At Tue, 16 Mar 2021 03:12:54 +0900, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> wrote in
> 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?
I agree that it's definitely not a client wait. It would be either
activity or IPC. My reasoning for the latter is it's similar to
WAIT_EVENT_WAL_RECEIVER_MAIN since both are a wait while
WalReceiverMain to continue. With a difference thatin walreceiver
hears where to start in the latter state.
I don't object if it were categorized to IPC, though.
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | tsunakawa.takay@fujitsu.com | 2021-03-16 03:02:41 | RE: libpq debug log |
Previous Message | Andres Freund | 2021-03-16 02:55:41 | Re: shared-memory based stats collector |