Re: pgsql: Remove the restriction that the relmap must be 512 bytes.

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Robert Haas <rhaas(at)postgresql(dot)org>, pgsql-committers <pgsql-committers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: Remove the restriction that the relmap must be 512 bytes.
Date: 2022-07-27 06:06:12
Message-ID: CA+hUKGJz_ryOF2yTUok8n+O+EtPWfV6UKoAj64LOTUbRQfbVzA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Wed, Jul 27, 2022 at 5:01 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> On Wed, Jul 27, 2022 at 4:35 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> > On Tue, Jul 26, 2022 at 07:10:22PM +0000, Robert Haas wrote:
> > > Remove the restriction that the relmap must be 512 bytes.
>
> > The CI on Windows is blowing up here and there after something that
> > looks to come from this commit, as of this backtrace:
> > 00000000`007fe300 00000001`405c62dd postgres!errfinish(
> > char * filename = 0x00000001`40bf1513 "fd.c",
> > int lineno = 0n756,
> > char * funcname = 0x00000001`40bf14e0 "durable_rename")+0x41b
> > [c:\cirrus\src\backend\utils\error\elog.c @ 683]
>
> And here's what the error looks like:
>
> 2022-07-26 19:38:04.321 GMT [8020][client backend]
> [pg_regress/vacuum][8/349:4527] PANIC: could not rename file
> "global/pg_filenode.map.tmp" to "global/pg_filenode.map": Permission
> denied
>
> 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.

Attachment Content-Type Size
0001-Fix-read_relmap_file-concurrency-on-Windows.patch text/x-patch 2.0 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2022-07-27 06:21:07 Re: pgsql: Remove the restriction that the relmap must be 512 bytes.
Previous Message Alvaro Herrera 2022-07-27 06:03:30 pgsql: Allow "in place" tablespaces.

Browse pgsql-hackers by date

  From Date Subject
Next Message Yuya Watari 2022-07-27 06:07:03 Re: [PoC] Reducing planning time when tables have many partitions
Previous Message Andrey Lepikhov 2022-07-27 05:42:28 Re: Fast COPY FROM based on batch insert