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

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: pgsql: Remove the restriction that the relmap must be 512 bytes.
Дата
Msg-id 20220727184523.n7emhydwhnegd2ci@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: pgsql: Remove the restriction that the relmap must be 512 bytes.  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: pgsql: Remove the restriction that the relmap must be 512 bytes.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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/



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Treat
Дата:
Сообщение: small windows psqlrc re-wording
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: standby recovery fails (tablespace related) (tentative patch and discussion)