Re: pg_rewind: Skip log directory for file type check like pg_wal - Mailing list pgsql-hackers

From Alexander Kukushkin
Subject Re: pg_rewind: Skip log directory for file type check like pg_wal
Date
Msg-id CAFh8B==cNpVV7SaRbKQyhg4t5pJvXWzgTupSX6L2M9+dLc3OEQ@mail.gmail.com
Whole thread Raw
In response to pg_rewind: Skip log directory for file type check like pg_wal  (Soumyadeep Chakraborty <soumyadeep2007@gmail.com>)
Responses Re: pg_rewind: Skip log directory for file type check like pg_wal  (Soumyadeep Chakraborty <soumyadeep2007@gmail.com>)
List pgsql-hackers
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
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.

Regards,
--
Alexander Kukushkin

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Add support for unit "B" to pg_size_pretty()
Next
From: Amit Kapila
Date:
Subject: Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher