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

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-06 08:28:10
Message-ID: CAFh8B==cNpVV7SaRbKQyhg4t5pJvXWzgTupSX6L2M9+dLc3OEQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2023-03-06 08:40:29 Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher
Previous Message David Rowley 2023-03-06 08:27:36 Re: Add support for unit "B" to pg_size_pretty()