From: | Alexander Kukushkin <cyberdemn(at)gmail(dot)com> |
---|---|
To: | Soumyadeep Chakraborty <soumyadeep2007(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_rewind: Skip log directory for file type check like pg_wal |
Date: | 2023-03-07 08:03:21 |
Message-ID: | CAFh8B==BRCLgJYXwJT04MPQSYnOEAzXcO3Y0FJEGV6jmbybOdA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, 7 Mar 2023 at 08:52, Soumyadeep Chakraborty <
soumyadeep2007(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2023-03-07 08:08:43 | Re: using memoize in in paralel query decreases performance |
Previous Message | Hayato Kuroda (Fujitsu) | 2023-03-07 07:55:04 | RE: Rework LogicalOutputPluginWriterUpdateProgress |