On 04/01/2019 20:35, Alvaro Herrera wrote:
> Seems you're registering the atexit cb twice here; you should only do so
> in the first "!conn" block.
OK, fixed.
>> @@ -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.
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.
I also added an atexit() conversion in isolationtester. It's mostly the
same thing.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services