Re: RecoveryInProgress() has critical side effects - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: RecoveryInProgress() has critical side effects
Date
Msg-id YZMYwDrseKTtZ9EB@paquier.xyz
Whole thread Raw
In response to Re: RecoveryInProgress() has critical side effects  ("Bossart, Nathan" <bossartn@amazon.com>)
Responses Re: RecoveryInProgress() has critical side effects
List pgsql-hackers
On Mon, Nov 15, 2021 at 10:09:17PM +0000, Bossart, Nathan wrote:
> On 11/15/21, 1:30 PM, "Robert Haas" <robertmhaas@gmail.com> wrote:
>> Here's a new version that does it that way. Any other opinions?
>
> LGTM

Patch 0001 means that the startup process would set up the structures
to be able to build WAL records before running any kind of recovery
action rather than doing it when it really needs it.  That's fine by
me.

Is patch 0002 actually right regarding the handling of doPageWrites?
Once applied, we finish by setting it when the startup process starts
and not anymore at the end of recovery based on its the state of
Insert, but this could have changed while in recovery when replaying
one or more XLOG_FPW_CHANGE records.

> I'm personally not too worried about a ~4% regression in this
> particular benchmark...

This is not a hot code path, that should be fine.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: Printing backtrace of postgres processes
Next
From: Amit Langote
Date:
Subject: Re: support for MERGE