Re: pgsql: Remove the restriction that the relmap must be 512 bytes.
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Robert Haas <rhaas@postgresql.org>, pgsql-committers <pgsql-committers@lists.postgresql.org>
Date: 2022-07-27T06:06:12Z
Lists: pgsql-hackers
Attachments
- 0001-Fix-read_relmap_file-concurrency-on-Windows.patch (text/x-patch) patch 0001
On Wed, Jul 27, 2022 at 5:01 PM Thomas Munro <thomas.munro@gmail.com> wrote: > On Wed, Jul 27, 2022 at 4:35 PM Michael Paquier <michael@paquier.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.
Commits
-
Bump catversion for commit d8cd0c6c95c0120168df93aae095df4e0682a08a.
- 5f858dd3bebd 16.0 landed
-
Fix read_relmap_file() concurrency on Windows.
- a2e97cb2b6fb 16.0 landed
-
Remove the restriction that the relmap must be 512 bytes.
- d8cd0c6c95c0 16.0 cited