From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Use atexit() in initdb and pg_basebackup |
Date: | 2019-01-05 01:23:36 |
Message-ID: | 20190105012336.GE4849@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jan 04, 2019 at 04:35:51PM -0300, Alvaro Herrera wrote:
> On 2018-Dec-29, Peter Eisentraut wrote:
>> @@ -3438,5 +3437,8 @@ main(int argc, char *argv[])
>>
>> destroyPQExpBuffer(start_db_cmd);
>>
>> + /* prevent cleanup */
>> + made_new_pgdata = found_existing_pgdata = made_new_xlogdir = found_existing_xlogdir = false;
>> +
>> return 0;
>> }
>
> This is a bit ugly, but meh.
>
> Other than the first point, LGTM.
Re-meuh (French version). That's partially a problem of this patch
because all those flags get reset. I think that it would be cleaner
to replace all those boolean flags with just a simple bits16 or such,
making the flag cleanup reset way cleaner, and less error-prone if
more flag types are added in the future.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2019-01-05 01:29:01 | Re: Unable to `make install` on MacOS in the latest master (68a13f28be) |
Previous Message | Michael Paquier | 2019-01-05 01:19:41 | Re: A few new options for vacuumdb |