[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    Re: [HACKERS] Missing FIN_CRC32 calls in logical replication code
From:       Andres Freund <andres () 2ndQuadrant ! com>
Date:       2014-10-31 13:46:31
Message-ID: 20141031134631.GG13584 () awork2 ! anarazel ! de
[Download RAW message or body]

On 2014-10-27 09:30:33 -0400, Tom Lane wrote:
> Andres Freund <andres@2ndQuadrant.com> writes:
> > On 2014-10-27 12:51:44 +0200, Heikki Linnakangas wrote:
> >> replication/slot.c and replication/logical/snapbuild.c use a CRC on the
> >> physical slot and snapshot files. It uses the same algorithm as used e.g.
> >> for the WAL. However, they are not doing the finalization step, FIN_CRC32()
> >> on the calculated checksums. Not that it matters much, but it's a bit weird
> >> and inconsistent, and was probably an oversight.
> 
> > Hm. Good catch - that's stupid. I wonder what to do about it. I'm
> > tempted to just add a comment about it to 9.4 and fix it on master as
> > changing it is essentially a catversion bump. Any objections to that?
> 
> Yeah, I think you should get it right the first time.  It hardly seems
> likely that any 9.4 beta testers are depending on those files to be stable
> yet.

Since both state files have the version embedded it'd be trivial to just
do the FIN_CRC32() when loading a version 2 file. Does anybody object to
the relevant two lines of code + docs?

Greetings,

Andres Freund

-- 
 Andres Freund	                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic