WAL page magic number (was Re: Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct) - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject WAL page magic number (was Re: Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct)
Date
Msg-id 4BD84F41.70506@enterprisedb.com
Whole thread Raw
In response to Re: Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: WAL page magic number (was Re: Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> The correct way to reflect a change in WAL contents is to
> bump the WAL page magic number.

Browsing the history of XLOG_PAGE_MAGIC, it used to be incremented by
one whenever the format changes, at least as long as it has been been in
xlog_internal.h. It started at 0xD05B in 2005, and was incremented by
one by each commit till 0xD062. But then the hot standby patch bumped it
to 0xD166, and on March 19th Simon changed it to 0x9002, and on March
28th to 0x9003.

Is there a plan somewhere on all that, or was it just random whacking?
It's a bit weird though that the commit on March 19th moved it
backwards. We don't guarantee backwards-compatibility, so any program
looking at the WAL needs to know not only minimum version it supports
but a list of all supported versions, so it's not catastrophic. Still
weird, though. It hasn't been like that for long yet, and not in any
released version, so we could still change it back to the original
scheme (0xD063).

0x9002 sounds like it means the 9.0 release, which might be a good
versioning scheme as well. If want to continue with that scheme, it
should be documented in the comments.

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct
Next
From: Robert Haas
Date:
Subject: Re: pg_start_backup and pg_stop_backup Re: Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct