Re: Wait event that should be reported while waiting for WAL archiving to finish

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Wait event that should be reported while waiting for WAL archiving to finish
Date: 2020-02-26 12:19:02
Message-ID: 164cddb8-d331-753c-6a97-b181206d72d6@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020/02/18 12:39, Michael Paquier wrote:
> On Mon, Feb 17, 2020 at 10:21:23PM +0900, Fujii Masao wrote:
>> On 2020/02/17 18:48, Michael Paquier wrote:
>>> Actually, I have some questions:
>>> 1) Should a new wait event be added in recoveryPausesHere()? That
>>> would be IMO useful.
>>
>> Yes, it's useful, I think. But it's better to implement that
>> as a separate patch.
>
> No problem for me.

On second thought, it's OK to add that event into the patch.
Attached is the updated version of the patch. This patch adds
two wait events for WAL archiving and recovery pause.

>>> 2) Perhaps those two points should be replaced with WaitLatch(), where
>>> we would use the new wait events introduced?
>>
>> For what? Maybe it should, but I'm not sure it's worth the trouble.
>
> I don't have more to offer than signal handling consistency for both
> without relying on pg_usleep()'s behavior depending on the platform,
> and power consumption. For the recovery pause, the second argument
> may not be worth carrying, but we never had this argument for the
> archiving wait, did we?

I have no idea about this. But I wonder how much that change
is helpful to reduce the power consumption because waiting
for WAL archive during the backup basically not so frequently
happens.

Regards,

--
Fujii Masao
NTT DATA CORPORATION
Advanced Platform Technology Group
Research and Development Headquarters

Attachment Content-Type Size
wait_event_wal_archive_v4.patch text/plain 3.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Steele 2020-02-26 13:39:13 Re: Commit fest manager for 2020-03
Previous Message Konstantin Knizhnik 2020-02-26 11:59:27 Re: Yet another vectorized engine