Re: Missing FIN_CRC32 calls in logical replication code - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Missing FIN_CRC32 calls in logical replication code
Date
Msg-id 54652B04.6080100@vmware.com
Whole thread Raw
In response to Re: Missing FIN_CRC32 calls in logical replication code  (Andres Freund <andres@2ndQuadrant.com>)
Responses Re: Missing FIN_CRC32 calls in logical replication code  (Andres Freund <andres@2ndQuadrant.com>)
List pgsql-hackers
On 11/11/2014 06:55 PM, Andres Freund wrote:
> On 2014-11-03 21:58:51 +0200, Heikki Linnakangas wrote:
>> PS. I find the name "ReplicationSlotOnDiskDynamicSize" confusing, as it is
>> in fact a fixed size struct. I gather it's expected that the size of that
>> part might change across versions, but by that definition nothing is
>> constant.
>
> Well, the idea is that the 'constant' part is version independent. The
> part following afterwards (dynamic) can differ based on the 'version'
> struct member. The reason is that that allows files from older releases
> to be read after a pg_upgrade.
>
> If you have suggestions for better names.

(It's a bit late, I know, but...)

I would actually suggest using the 'magic' field as the version 
identifier. Increment it by one on every version change. It would be 
handy to have the version ID as the first field in the file.

- Heikki




pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: group locking: incomplete patch, just for discussion
Next
From: Michael Paquier
Date:
Subject: Re: Inconsistencies in documentation of row-level locking