Re: WAL segments removed from primary despite the fact that logical replication slot needs it.
hubert depesz lubaczewski <depesz@depesz.com>
From: hubert depesz lubaczewski <depesz@depesz.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: pgsql-bugs mailing list <pgsql-bugs@postgresql.org>
Date: 2022-10-19T11:11:06Z
Lists: pgsql-bugs
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix a possibility of logical replication slot's restart_lsn going backwards.
- e5ed873b1b4a 18.0 landed
- 568e78a653ee 17.2 landed
- f353911337cf 16.6 landed
- 91771b3fbbc3 15.10 landed
- 26c4e8968690 14.15 landed
- 15dc1abb17dd 13.18 landed
On Tue, Oct 18, 2022 at 04:57:52PM +0530, Amit Kapila wrote: > On Mon, Oct 17, 2022 at 2:43 PM hubert depesz lubaczewski > <depesz@depesz.com> wrote: > > > > 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? > > > > Yes. BTW, are you on the latest release of pg12, if not then you can > once check the release notes to see if there is any related bug fix in > the later releases? We're not. We're on 12.9, and there seem to be some wal-related changes since then: https://why-upgrade.depesz.com/show?from=12.9&to=12.12&keywords=wal* will talk with responsible people about upgrading it, and then redoing the test. Best regards, depesz