Re: Is this a problem in GenericXLogFinish()?

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Alexander Lakhin <exclusion(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Is this a problem in GenericXLogFinish()?
Date: 2024-04-11 00:23:34
Message-ID: ZhcthvKES_i6oVUC@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 10, 2024 at 03:28:22PM +0530, Amit Kapila wrote:
> I can understand this comment as I am aware of this code but not sure
> it would be equally easy for the people first time looking at this
> code. One may try to find the equivalent assertion in
> _hash_freeovflpage(). The alternative could be: "Ensure that the
> required flags are set when there are no tuples. See
> _hash_freeovflpage().". I am also fine if you prefer to go with your
> proposed comment.

Yes, I can see your point about why that's confusing. Your suggestion
is much better, so after a second look I've used your version of the
comment and applied the patch on HEAD.

I am wondering if we have other problems like that with dirty buffers
at replay. Perhaps I should put my nose more onto the replay paths
and extend these automated checks with wal_consistency_checking.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2024-04-11 00:35:38 Re: Issue with the PRNG used by Postgres
Previous Message Tom Kincaid 2024-04-11 00:23:19 Re: post-freeze damage control