Always bump PG_CONTROL_VERSION? - Mailing list pgsql-hackers

From David Steele
Subject Always bump PG_CONTROL_VERSION?
Date
Msg-id 72a8c68b-20a4-d183-7046-7f16d43a5c3f@pgmasters.net
Whole thread Raw
Responses Re: Always bump PG_CONTROL_VERSION?
Re: Always bump PG_CONTROL_VERSION?
List 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@pgmasters.net



pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: seawasp failing, maybe in glibc allocator
Next
From: Alvaro Herrera
Date:
Subject: Re: Always bump PG_CONTROL_VERSION?