Re: "unexpected duplicate for tablespace" problem in logical replication - Mailing list pgsql-bugs

From Ashutosh Bapat
Subject Re: "unexpected duplicate for tablespace" problem in logical replication
Date
Msg-id CAExHW5uQ7xE9zuRT6Au1VG_eJXZJtVLe1KP7HRsoRw2iRuQQyw@mail.gmail.com
Whole thread Raw
In response to Re: "unexpected duplicate for tablespace" problem in logical replication  (Michael Paquier <michael@paquier.xyz>)
Responses Re: "unexpected duplicate for tablespace" problem in logical replication
List pgsql-bugs
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

Attachment

pgsql-bugs by date:

Previous
From: Amit Langote
Date:
Subject: Re: BUG #19056: ExecInitPartitionExecPruning segfault due to NULL es_part_prune_infos
Next
From: Andres Freund
Date:
Subject: Re: "unexpected duplicate for tablespace" problem in logical replication