Re: [BUG] Logical replication failure "ERROR: could not map filenode "base/13237/442428" to relation OID" with catalog modifying txns
Jeremy Schneider <schnjere@amazon.com>
From: Jeremy Schneider <schnjere@amazon.com>
To: <pgsql-hackers@lists.postgresql.org>
Date: 2021-10-01T19:49:34Z
Lists: pgsql-hackers
On 7/29/21 01:25, Masahiko Sawada wrote: > On Tue, Mar 16, 2021 at 1:35 AM Oh, Mike <minsoo@amazon.com> wrote: >> >> Sending this to pgsql-hackers list to create a CommitFest entry with the attached patch proposal. >> >> ... >> >> Detailed problem description: >> >> Tested on 11.8 & current master. >> >> The logical replication slot restart_lsn advances in the middle of an open txn that modified the catalog (e.g. TRUNCATE operation). >> >> Should the logical decoding has to restart it could fail with an error like this: >> >> ERROR: could not map filenode "base/13237/442428" > > Thank you for reporting the issue. > > I could reproduce this issue by the steps you shared. I also noticed a bug report earlier this year with another PG user reporting the same error - on version 12.3 https://www.postgresql.org/message-id/flat/16812-3d9df99bd77ff616%40postgresql.org Today I received a report from a new PG user of this same error message causing their logical replication to break. This customer was also running PostgreSQL 12.3 on both source and target side. Haven't yet dumped WAL or anything, but wanted to point out that the error is being seen in the wild - I hope we can get a version of this patch committed soon, as it will help with at least one cause. -Jeremy -- Jeremy Schneider Database Engineer Amazon Web Services
Commits
-
Fix the incorrect assertion introduced in commit 7f13ac8123.
- d2169c998553 16.0 landed
-
Fix catalog lookup with the wrong snapshot during logical decoding.
- 7f13ac812313 16.0 landed
- 272248a0c1b1 15.0 landed
- 68dcce247f1a 14.6 landed
- 547b963683e3 13.9 landed
- 794460783125 12.13 landed
- e721123b7a0c 11.18 landed
- bf0718c137c4 10.23 landed
-
Clean up assorted failures under clang's -fsanitize=undefined checks.
- 46ab07ffda9d 15.0 cited