Re: PATCH: add "--config-file=" option to pg_rewind

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: PATCH: add "--config-file=" option to pg_rewind
Дата
Msg-id Yhm/0lbQreKsNd8h@paquier.xyz
обсуждение исходный текст
Ответ на Re: PATCH: add "--config-file=" option to pg_rewind  ("Gunnar \"Nick\" Bluth" <gunnar.bluth@pro-open.de>)
Ответы Re: PATCH: add "--config-file=" option to pg_rewind  ("Gunnar \"Nick\" Bluth" <gunnar.bluth@pro-open.de>)
Список pgsql-hackers
On Fri, Feb 25, 2022 at 10:35:49AM +0100, Gunnar "Nick" Bluth wrote:
> Am 24.02.22 um 14:46 schrieb Daniel Gustafsson:
>> Actually, I think this looks like a saner approach.  Putting a config setting
>> in two place (postgresql.conf and on the commandline for pg_rewind) is a recipe
>> for them diverging.

FWIW, I have a bad feeling about passing down directly a command
through an option itself part of a command, so what's discussed on
this thread is refreshing.

+       } else {
+               snprintf(postgres_cmd, sizeof(postgres_cmd),
+                        "\"%s\" -D \"%s\" --config_file=\"%s\" -C restore_command",
+                        postgres_exec_path, datadir_target, config_file);
+       }

Shouldn't this one use appendShellString() on config_file?
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Commitfest manager for 2022-03
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Frontend error logging style