Re: Issue in GIN fast-insert: XLogBeginInsert + Read/LockBuffer ordering - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Issue in GIN fast-insert: XLogBeginInsert + Read/LockBuffer ordering
Date
Msg-id 3956139.1666673900@sss.pgh.pa.us
Whole thread Raw
In response to Re: Issue in GIN fast-insert: XLogBeginInsert + Read/LockBuffer ordering  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Issue in GIN fast-insert: XLogBeginInsert + Read/LockBuffer ordering  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes:
> On Mon, Oct 24, 2022 at 02:22:16PM +0200, Alvaro Herrera wrote:
>> I confess I don't understand why is it important that XLogBeginInsert is
>> called inside the critical section.  It seems to me that that part is
>> only a side-effect of having to acquire the buffer locks in the critical
>> section.  Right?

> Yeah, you are right that it would not matter for XLogBeginInsert(),
> though I'd like to think that this is a good practice on consistency
> grounds with anywhere else, and we respect what's documented in the
> README.

Yeah --- it's documented that way, and there doesn't seem to be
a good reason not to honor that here.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Issue in GIN fast-insert: XLogBeginInsert + Read/LockBuffer ordering
Next
From: Michael Paquier
Date:
Subject: Re: GUC values - recommended way to declare the C variables?