Re: Renaming of pg_xlog and pg_clog

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Craig Ringer <craig(dot)ringer(at)2ndquadrant(dot)com>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Subject: Re: Renaming of pg_xlog and pg_clog
Date: 2016-10-03 13:00:33
Message-ID: CA+TgmobOyVNLA7DacLDY9yO_cBWMrkFfKSab6+Hrycu8Mh93Yw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 30, 2016 at 1:45 AM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)com> wrote:
> As there have been no reviews at code level, I am moving that to the next CF.

Code review of 0001:

I think the tests for PQserverVersion(conn) / 100 >= 1000 are strange.
I submit that either PQserverVersion(conn) >= 100000 or
PQserverVersion(conn) / 10000 >= 10 is an easier-to-understand test.
I vote for the first style. So in pg_basebackup.c I'd do:

#define MINIMUM_VERSION_FOR_PG_WAL 100000
...
int version = PQserverVersion(conn);
...
if (version >= MINIMUM_VERSION_FOR_PG_WAL)
/* do whatever */

Also, for this sort of thing:

+ if (!conn)
+ /* Error message already written in GetConnection() */
+ exit(1);

...because of the comment, I'd add braces around this.

Tom changed the error-reporting framework for pg_upgrade in
f002ed2b8e45286fe73a36e119cba2016ea0de19, so you'll need to do some
rebasing over that. I haven't checked what the new conventions are,
but obviously you'll want to try to be consistent with them.

Other than those minor nitpicks, I think this looks OK. I'm not sure
we have consensus on 0002, but 0001 seems to be popular with far more
people than not.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-10-03 13:49:37 Re: [COMMITTERS] pgsql: Copy-editing for contrib/pg_visibility documentation.
Previous Message Jesper Pedersen 2016-10-03 12:52:44 Re: pageinspect: Hash index support