Re: Refactor backup related code (was: Is it correct to say, "invalid data in file \"%s\"", BACKUP_LABEL_FILE in do_pg_backup_stop?)

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Refactor backup related code (was: Is it correct to say, "invalid data in file \"%s\"", BACKUP_LABEL_FILE in do_pg_backup_stop?)
Дата
Msg-id YzI7OsKnqdknOHyD@paquier.xyz
обсуждение исходный текст
Ответ на Re: Refactor backup related code (was: Is it correct to say, "invalid data in file \"%s\"", BACKUP_LABEL_FILE in do_pg_backup_stop?)  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
On Mon, Sep 26, 2022 at 05:10:16PM +0900, Kyotaro Horiguchi wrote:
> -    if (strcmp(backupfrom, "standby") == 0 && !backup_started_in_recovery)
> +    if (state->started_in_recovery == true &&
> +        backup_stopped_in_recovery == false)
>
> Using == for Booleans may not be great?

Yes.  That's why 7d70809 does not use the way proposed by the previous
patch.
--
Michael

Вложения

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

Предыдущее
От: Peter Smith
Дата:
Сообщение: GUC values - recommended way to declare the C variables?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: GUC values - recommended way to declare the C variables?