Re: PATCH: add "--config-file=" option to pg_rewind - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: PATCH: add "--config-file=" option to pg_rewind
Date
Msg-id Yhm/0lbQreKsNd8h@paquier.xyz
Whole thread Raw
In response to Re: PATCH: add "--config-file=" option to pg_rewind  ("Gunnar \"Nick\" Bluth" <gunnar.bluth@pro-open.de>)
Responses Re: PATCH: add "--config-file=" option to pg_rewind  ("Gunnar \"Nick\" Bluth" <gunnar.bluth@pro-open.de>)
List 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

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Commitfest manager for 2022-03
Next
From: Tom Lane
Date:
Subject: Re: Frontend error logging style