Re: pg_dump: Simplify internal archive version handling

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump: Simplify internal archive version handling
Date: 2016-10-13 13:13:03
Message-ID: 28553.1476364383@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-10-13 13:29:35 Re: munmap() failure due to sloppy handling of hugepage size
Previous Message Tom Lane 2016-10-13 12:58:56 Re: Proposal: scan key push down to heap [WIP]