Re: pg_dump: Simplify internal archive version handling - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_dump: Simplify internal archive version handling
Date
Msg-id 28553.1476364383@sss.pgh.pa.us
Whole thread Raw
In response to pg_dump: Simplify internal archive version handling  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: pg_dump: Simplify internal archive version handling  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> I propose the attached patch to clean up some redundancy and confusion
> in pg_dump.

Looks sane, though I'd suggest coding the access macros with shifts
not multiplies/divides.

Since these numbers are purely internal and not stored in this form in the
file, I wonder whether we shouldn't drop the rightmost zero byte, ie make
it just <maj><min><rev> not <maj><min><rev>00.  That would save at least
one divide/shift when accessing.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Proposal: scan key push down to heap [WIP]
Next
From: Tom Lane
Date:
Subject: Re: munmap() failure due to sloppy handling of hugepage size