Re: pgsql: Remove the restriction that the relmap must be 512 bytes. - Mailing list pgsql-committers

From Thomas Munro
Subject Re: pgsql: Remove the restriction that the relmap must be 512 bytes.
Date
Msg-id CA+hUKGJBTGr8A6aW3ND-nEQPL1f3_RjSrfEDryki_bdGaJX2Vg@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Remove the restriction that the relmap must be 512 bytes.  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: pgsql: Remove the restriction that the relmap must be 512 bytes.
List pgsql-committers
On Wed, Jul 27, 2022 at 6:06 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> On Wed, Jul 27, 2022 at 5:01 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> > Someone else still has the old file open, so we can't rename the new
> > one to its name?  On Windows that should have gone through pgrename()
> > in dirmod.c, which would retry 100 times with a 100ms sleep between.
> > Since every backend reads that file (I added an elog() and saw it 2289
> > times during make check), I guess you can run out of luck.
> >
> > /me thinks
>
> Maybe we just have to rearrange the locking slightly?  Something like
> the attached.

Erm, let me try that again, this time with the CloseTransientFile()
also under the lock, so that we never have a file handle without a
lock.

Attachment

pgsql-committers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: pgsql: Remove the restriction that the relmap must be 512 bytes.
Next
From: Michael Paquier
Date:
Subject: Re: pgsql: Remove the restriction that the relmap must be 512 bytes.