From: hubert depesz lubaczewski <depesz@depesz.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: pgsql-bugs mailing list <pgsql-bugs@postgresql.org>
Subject: Re: WAL segments removed from primary despite the fact that logical replication slot needs it.
Date: Mon, 17 Oct 2022 11:13:11 +0200
Message-ID: <Y00cp4sNQtFNoo25@depesz.com> (raw)
In-Reply-To: <CAA4eK1JTE0tLgR5qzVECrKJV5VVTnDa0k5LQ4TOkBAA=MySj3g@mail.gmail.com>
References: <Yz2hivgyjS1RfMKs@depesz.com>
<CAA4eK1JTE0tLgR5qzVECrKJV5VVTnDa0k5LQ4TOkBAA=MySj3g@mail.gmail.com>
On Sun, Oct 16, 2022 at 10:35:17AM +0530, Amit Kapila wrote:
> > Wal file has been removed. Please note that the file was, as shown earlier, still within "restart_lsn" as visibile on pg12/bionic.
> This is quite strange and I am not able to see the reason why this can
> happen. The only way to debug this problem that comes to mind is to
> add more LOGS around the code that removes the WAL files. For example,
> we can try to print the value of minimumslotLSN (keep) and logSegNo in
> KeepLogSeg().
That would require changing pg sources, I think, recompiling, and
retrying?
And on the pg12 side? I don't think we can do it, but I'll ask boss.
> > Anyone has any idea on how to investigate/fix that?
> As suggested above, I feel we need to add some LOGS to see what is
> going on unless you have a reproducible testcase.
The problem is that we were trying to use this approach to upgrade pg12
production db to pg14. Modifying it (pg12) will be tricky, as it would
require restart. Unless there is a way to add extra logging without
restart...
depesz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: depesz@depesz.com, amit.kapila16@gmail.com
Subject: Re: WAL segments removed from primary despite the fact that logical replication slot needs it.
In-Reply-To: <Y00cp4sNQtFNoo25@depesz.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox