Re: Is this a problem in GenericXLogFinish()? - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Is this a problem in GenericXLogFinish()?
Date
Msg-id 399492009193fa2c37a61b630e4449546a550039.camel@j-davis.com
Whole thread Raw
In response to Re: Is this a problem in GenericXLogFinish()?  (Heikki Linnakangas <hlinnaka@iki.fi>)
Responses Re: Is this a problem in GenericXLogFinish()?
List pgsql-hackers
On Mon, 2023-09-25 at 13:04 +0300, Heikki Linnakangas wrote:
> Yes, that's a problem.

Patch attached. I rearranged the code a bit to follow the expected
pattern of: write, mark dirty, WAL, set LSN. I think computing the
deltas could also be moved earlier, outside of the critical section,
but I'm not sure that would be useful.

Do you have a suggestion for any kind of test addition, or should we
just review carefully?

> I wish we had an assertion for that. XLogInsert() could assert that
> the
> page is already marked dirty, for example.

Unfortunately that's not always the case, e.g. log_newpage_range().

Regards,
    Jeff Davis


Attachment

pgsql-hackers by date:

Previous
From: Jim Jones
Date:
Subject: Re: [PATCH] Add inline comments to the pg_hba_file_rules view
Next
From: David Steele
Date:
Subject: Re: Add const qualifiers