Re: WAL segments removed from primary despite the fact that logical replication slot needs it.

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: pgsql-bugs mailing list <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: WAL segments removed from primary despite the fact that logical replication slot needs it.
Date: 2022-10-17 09:13:11
Message-ID: Y00cp4sNQtFNoo25@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message hubert depesz lubaczewski 2022-10-17 09:14:32 Re: WAL segments removed from primary despite the fact that logical replication slot needs it.
Previous Message Julien Rouhaud 2022-10-17 08:15:16 Re: BUG #17645: Strange queries that stuck in database system