On Tue, 7 Mar 2023 at 08:52, Soumyadeep Chakraborty <
soumyadeep2...@gmail.com> wrote:

>
> > It couldn't be achieved just by introducing a static string "log". The
> "log_directory" GUC must be examined on both, source and target.
>
> Trouble with doing that is if pg_rewind is run in non-libpq (offline)
> mode. Then we would have to parse it out of the conf file(s)?
> Is there a standard way of doing that?
>

pg_rewind is already doing something similar for "restore_command":
/*
 * Get value of GUC parameter restore_command from the target cluster.
 *
 * This uses a logic based on "postgres -C" to get the value from the
 * cluster.
 */
static void
getRestoreCommand(const char *argv0)

For the running source cluster one could just use "SHOW log_directory"

Regards,
--
Alexander Kukushkin

Reply via email to