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

2022-07-27 Thread Tom Lane
Robert Haas writes: > In short, I think Alvaro's idea is unprincipled but solves the problem > of making it clear that a new initdb is required. Your idea is > principled but does not solve any problem. [ shrug... ] Fair enough. regards, tom lane

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

2022-07-27 Thread Robert Haas
On Wed, Jul 27, 2022 at 3:17 PM Tom Lane wrote: > Alvaro Herrera writes: > >> Hmm, but that doesn't actually produce nice behavior. It just goes > >> into an infinite loop, like this: > >> So now I'm back to being unsure what to do here. > > > I vote to go for the catversion bump for now. > > Wha

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

2022-07-27 Thread Tom Lane
Alvaro Herrera writes: >> Hmm, but that doesn't actually produce nice behavior. It just goes >> into an infinite loop, like this: >> So now I'm back to being unsure what to do here. > I vote to go for the catversion bump for now. What this is showing us is that any form of corruption in the re

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

2022-07-27 Thread Alvaro Herrera
On 2022-Jul-27, Robert Haas wrote: > Hmm, but that doesn't actually produce nice behavior. It just goes > into an infinite loop, like this: > 2022-07-27 14:21:12.869 EDT [32853] FATAL: relation mapping file > "global/pg_filenode.map" contains invalid data This seems almost identical what happen

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

2022-07-27 Thread Robert Haas
On Wed, Jul 27, 2022 at 2:13 PM Robert Haas wrote: > On Wed, Jul 27, 2022 at 1:42 PM Tom Lane wrote: > > If there's a magic number, then I'd (a) change that and (b) adjust > > whatever comments led you to think you shouldn't. Bumping catversion > > is a good fallback choice when there's not any

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

2022-07-27 Thread Robert Haas
On Wed, Jul 27, 2022 at 1:42 PM Tom Lane wrote: > If there's a magic number, then I'd (a) change that and (b) adjust > whatever comments led you to think you shouldn't. Bumping catversion > is a good fallback choice when there's not any more-proximate version > indicator, but here there is. Mayb

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

2022-07-27 Thread Tom Lane
Robert Haas writes: > On Wed, Jul 27, 2022 at 1:19 PM Alvaro Herrera > wrote: >> Another thing that seems to have happened here is that catversion ought >> to have been touched and wasn't. > Hmm, interesting. I didn't think about bumping catversion because I > didn't change anything in the cata

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

2022-07-27 Thread Robert Haas
On Wed, Jul 27, 2022 at 1:19 PM Alvaro Herrera wrote: > Another thing that seems to have happened here is that catversion ought > to have been touched and wasn't. Trying to start a cluster that was > initdb'd with the previous code enters an infinite loop that dies each > time with > > 2022-07-27

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

2022-07-27 Thread Alvaro Herrera
On 2022-Jul-26, 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 struct padding and the > calculation