From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
Cc: | Jeff Davis <pgsql(at)j-davis(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Is this a problem in GenericXLogFinish()? |
Date: | 2023-10-11 12:25:12 |
Message-ID: | CA+TgmobWm1oqVPP3h+DixZEs=CELhsoySr5uqPtoVNR8H0kwzw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Oct 11, 2023 at 7:53 AM Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
> > + * Buffer must be pinned and exclusive-locked. (If caller does not hold
> > + * exclusive lock, then the result may be stale before it's returned.)
> The comment suggests that you don't need to hold an exclusive lock when
> you call this, but there's an assertion that you do.
I don't think the comment suggests that. It would if you only read the
sentence in parentheses. But if you read both of them it seems clear
enough. I guess the parenthetical sentence cloud say "If the caller
did not hold an exclusive lock, then the result might become stale
even before it was returned," basically putting the whole thing in the
subjunctive.
--
Robert Haas
EDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2023-10-11 12:26:01 | Re: Add null termination to string received in parallel apply worker |
Previous Message | Heikki Linnakangas | 2023-10-11 11:53:02 | Re: Is this a problem in GenericXLogFinish()? |