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

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: Remove the restriction that the relmap must be 512 bytes.
Date: 2022-07-27 18:45:23
Message-ID: 20220727184523.n7emhydwhnegd2ci@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

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 happens without the version number
change, so I wouldn't call it much of an improvement.

> While I agree that changing a version identifier that is more closely
> related to what got changed is better than changing a generic one, I
> think people won't like an infinite loop that spews messages into the
> log at top speed as a way of telling them about the problem.
>
> So now I'm back to being unsure what to do here.

I vote to go for the catversion bump for now.

Maybe it's possible to patch the relmapper code afterwards, so that if a
version mismatch is detected the server is stopped with a reasonable
message. An hypothetical improvement would be to keep the code to read
the old version and upgrade the file automatically, but given the number
of times that this file has changed, it's likely pointless effort.

Therefore, my proposal is to add a comment next to the struct definition
suggesting to bump catversion and call it a day.

--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2022-07-27 19:17:36 Re: pgsql: Remove the restriction that the relmap must be 512 bytes.
Previous Message Robert Haas 2022-07-27 18:24:23 Re: pgsql: Remove the restriction that the relmap must be 512 bytes.

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2022-07-27 18:54:49 Re: standby recovery fails (tablespace related) (tentative patch and discussion)
Previous Message Robert Treat 2022-07-27 18:42:11 small windows psqlrc re-wording