Re: Use atexit() in initdb and pg_basebackup

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Use atexit() in initdb and pg_basebackup
Дата
Msg-id 20190105012336.GE4849@paquier.xyz
обсуждение исходный текст
Ответ на Re: Use atexit() in initdb and pg_basebackup  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: A few new options for vacuumdb
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Unable to `make install` on MacOS in the latest master(68a13f28be)