On Mon, Mar 6, 2023 at 12:28 AM Alexander Kukushkin <cyberd...@gmail.com> wrote:
>
> Hello Soumyadeep,
>
> The problem indeed exists, but IMO the "log" directory case must be handled 
> differently:
> 1. We don't need or I would even say we don't want to sync log files from the 
> new primary, because it destroys the actual logs, which could be very 
> important to figure out what has happened with the old primary

Yes, this can be solved by adding "log" to excludeDirContents. We did
this for GPDB.

> 2. Unlike "pg_wal", the "log" directory is not necessarily located inside 
> PGDATA. The actual value is configured using "log_directory" GUC, which just 
> happened to be "log" by default. And in fact actual values on source and 
> target could be different.

I think we only care about files/dirs inside the datadir. Anything
outside is out of scope for
pg_rewind AFAIU. We can only address the common case here. As mentioned in this
comment:

 * XXX: There is no backend function to get a symbolic link's target in
 * general, so if the admin has put any custom symbolic links in the data
 * directory, they won't be copied correctly.

There is not much we can do about custom configurations.

Regards,
Soumyadeep (VMware)


Reply via email to