Re: "unexpected duplicate for tablespace" problem in logical replication
Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
From: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: vignesh C <vignesh21@gmail.com>, Masahiko Sawada <sawada.mshk@gmail.com>, Robert Haas <robertmhaas@gmail.com>,
Kyotaro Horiguchi <horikyota.ntt@gmail.com>, wangsh.fnst@fujitsu.com, osumi.takamichi@fujitsu.com, pgsql-bugs@lists.postgresql.org, Andres Freund <andres@anarazel.de>
Date: 2025-09-18T12:07:10Z
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 →
-
Ignore temporary relations in RelidByRelfilenumber()
- 30b32b08c9e9 13.23 landed
- 222130edd81f 14.20 landed
- ec471008c8fc 15.15 landed
- ab874faaa1f3 16.11 landed
- dcdc95cb4d4c 17.7 landed
- 86831952ad60 18.0 landed
- ef03ea01fe47 19 (unreleased) landed
Attachments
- 0001-Negative-RelfilenumberMap-cache-entries-fro-20250918.patch (text/x-patch) patch 0001
On Thu, Aug 21, 2025 at 11:42 AM Michael Paquier <michael@paquier.xyz> wrote: > > On Wed, Aug 13, 2025 at 03:29:50PM +0530, Ashutosh Bapat wrote: > > >>> Logical replication and autoprewarm may not cause such a large bloat > >>> but there is no limit to passing invalid combinations of reltablespace > >>> and relfilenumber to pg_filenode_relation(). Do we want to prohibit > >>> that case by passing a flag from logical pg_filenode_relation() to not > >>> cache invalid entries? > > Fun. Yes, I agree that we could do better here. It does not strike > me as an issue as invasive as the original report, direct calls of > pg_filenode_relation() are much rarer than the code paths of > autoprewarm and logical replication touched by RelidByRelfilenumber(). > That's a potential HEAD improvement to me. Sorry for taking time. Here's a patch to address this. Added to the commitfest. -- Best Wishes, Ashutosh Bapat