Always bump PG_CONTROL_VERSION?

From: David Steele <david(at)pgmasters(dot)net>
To: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Always bump PG_CONTROL_VERSION?
Date: 2021-05-12 18:58:11
Message-ID: 72a8c68b-20a4-d183-7046-7f16d43a5c3f@pgmasters.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hackers,

I would like to propose bumping PG_CONTROL_VERSION with each release
even if there are no changes to the ControlFileData struct. Historically
PG_CONTROL_VERSION has only been bumped when there were changes to
ControlFileData.

pgBackRest uses PG_CONTROL_VERSION to identify the version of PostgreSQL
when it is not running. If PG_CONTROL_VERSION does not change from a
prior version then we also use CATALOG_VERSION_NO to uniquely identify
the version.

This works fine, but is pretty fragile during the alpha/beta releases
when CATALOG_VERSION_NO is likely to change with each release. Of
course, PG_CONTROL_VERSION might change as well but this seems to be
extremely rare for an alpha/beta release.

There are a few commits like eeca4cd3 and 99dd8b05a that would seem to
argue that bumping PG_CONTROL_VERSION at least once for each release is
a good idea in general. It doesn't seem too useful to be able to run
pg_resetwal or pg_controldata against another version, in the few cases
that it would actually work, e.g. 9.6/9.5.

Thoughts?
--
-David
david(at)pgmasters(dot)net

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2021-05-12 19:21:45 Re: Always bump PG_CONTROL_VERSION?
Previous Message Fabien COELHO 2021-05-12 18:30:56 Re: seawasp failing, maybe in glibc allocator