Re: pg_rewind: Skip log directory for file type check like pg_wal

Soumyadeep Chakraborty <soumyadeep2007@gmail.com>

From: Soumyadeep Chakraborty <soumyadeep2007@gmail.com>
To: Alexander Kukushkin <cyberdemn@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-03-07T07:51:52Z
Lists: pgsql-hackers
On Mon, Mar 6, 2023 at 11:33 PM Alexander Kukushkin <cyberdemn@gmail.com> wrote:
>
>
> Lets assume that on the source we have "pg_log" and on the target we have "my_log" (they are configured using "log_directory" GUC).
> When doing rewind in this case we want neither to remove the content of "my_log" on the target nor to copy content of "pg_log" from the source.
> 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?

Regards,
Soumyadeep (VMware)