From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Use atexit() in initdb and pg_basebackup
Date: Sat, 5 Jan 2019 12:42:47 -0300
Message-ID: <201901051542.macmepgkz3zr@alvherre.pgsql> (raw)
In-Reply-To: <3d072ada-198a-f5ee-8769-bc51823d4f19@2ndquadrant.com>
On 2019-Jan-05, Peter Eisentraut wrote:
> On 04/01/2019 20:35, Alvaro Herrera wrote:
> >> + /* prevent cleanup */
> >> + made_new_pgdata = found_existing_pgdata = made_new_xlogdir = found_existing_xlogdir = false;
> >> +
> >> return 0;
> >> }
> >
> > This is a bit ugly, but meh.
>
> Yeah. Actually, we already have a solution of this in pg_basebackup,
> with a bool success variable. I rewrote it like that. At least it's
> better for uniformity.
Ah, yeah, much better, LGTM.
> I also added an atexit() conversion in isolationtester. It's mostly the
> same thing.
LGTM in a quick eyeball.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: alvherre@2ndquadrant.com, peter.eisentraut@2ndquadrant.com
Subject: Re: Use atexit() in initdb and pg_basebackup
In-Reply-To: <201901051542.macmepgkz3zr@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox