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