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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: "Gunnar \"Nick\" Bluth" <gunnar(dot)bluth(at)pro-open(dot)de>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, Alexander Kukushkin <cyberdemn(at)gmail(dot)com>, Aleksander Alekseev <aleksander(at)timescale(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, x4mmm(at)yandex-team(dot)ru, kondratovaleksey(at)gmail(dot)com
Subject: Re: PATCH: add "--config-file=" option to pg_rewind
Date: 2022-02-26 05:51:14
Message-ID: Yhm/
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: 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?

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-02-26 05:55:34 Re: Frontend error logging style
Previous Message Michael Paquier 2022-02-26 05:42:33 Re: Commitfest manager for 2022-03