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

Поиск
Список
Период
Сортировка
От Soumyadeep Chakraborty
Тема Re: pg_rewind: Skip log directory for file type check like pg_wal
Дата
Msg-id CAE-ML+_miDfT62xhz+fEG3r-ffhGyttLUajA=5LVn0pPJG95bg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_rewind: Skip log directory for file type check like pg_wal  (Alexander Kukushkin <cyberdemn@gmail.com>)
Ответы Re: pg_rewind: Skip log directory for file type check like pg_wal  (Alexander Kukushkin <cyberdemn@gmail.com>)
Список pgsql-hackers
On Mon, Mar 6, 2023 at 12:28 AM Alexander Kukushkin <cyberdemn@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
actuallogs, 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
couldbe 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)



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: About default inBufSize (connection read buffer size) in libpq
Следующее
От: "Gregory Stark (as CFM)"
Дата:
Сообщение: Re: Commitfest 2023-03 starting tomorrow!