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

2022-07-27 Thread Robert Haas
On Wed, Jul 27, 2022 at 6:25 AM Michael Paquier wrote: > Right. The whole write_relmap_file() already happens while taking > RelationMappingLock, so that seems like a good idea for consistency at > the end (even if I remember that there is a patch floating around to > improve the concurrency of p

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

2022-07-27 Thread Michael Paquier
On Wed, Jul 27, 2022 at 06:21:07PM +1200, Thomas Munro wrote: > 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. Right. The whole write_relmap_file() already happens while taking RelationMappingLock, s

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

2022-07-26 Thread Thomas Munro
On Wed, Jul 27, 2022 at 6:06 PM Thomas Munro wrote: > On Wed, Jul 27, 2022 at 5:01 PM Thomas Munro 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

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

2022-07-26 Thread Thomas Munro
On Wed, Jul 27, 2022 at 5:01 PM Thomas Munro wrote: > On Wed, Jul 27, 2022 at 4:35 PM Michael Paquier wrote: > > On Tue, Jul 26, 2022 at 07:10:22PM +, Robert Haas wrote: > > > Remove the restriction that the relmap must be 512 bytes. > > > The CI on Windows is blowing up here and there after

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

2022-07-26 Thread Thomas Munro
On Wed, Jul 27, 2022 at 4:35 PM Michael Paquier wrote: > On Tue, Jul 26, 2022 at 07:10:22PM +, 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 ba

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

2022-07-26 Thread Michael Paquier
Hi Robert, On Tue, Jul 26, 2022 at 07:10:22PM +, Robert Haas wrote: > Remove the restriction that the relmap must be 512 bytes. > > Instead of relying on the ability to atomically overwrite the > entire relmap file in one shot, write a new one and durably > rename it into place. Removing the

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

2022-07-26 Thread Robert Haas
Remove the restriction that the relmap must be 512 bytes. Instead of relying on the ability to atomically overwrite the entire relmap file in one shot, write a new one and durably rename it into place. Removing the struct padding and the calculation showing why the map is exactly 512 bytes, and ch