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

From Robert Haas
Subject Re: "unexpected duplicate for tablespace" problem in logical replication
Date
Msg-id CA+TgmoYADF0ddp4JO_a8AiUDKCLFGTAw7ii8OniLBzmwVG8njg@mail.gmail.com
Whole thread Raw
In response to Re: "unexpected duplicate for tablespace" problem in logical replication  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: "unexpected duplicate for tablespace" problem in logical replication  (Michael Paquier <michael@paquier.xyz>)
List pgsql-bugs
On Mon, Jan 15, 2024 at 8:58 PM Kyotaro Horiguchi
<horikyota.ntt@gmail.com> wrote:
> Do you mean that the current behavior of the SQL-callable function is
> being treated as a bug and should it be corrected?
>
> Simply doing so will result in the functions pg_relation_filenode()
> and pg_filenode_relation() behaving asymmetrically. While there is no
> need to purposely change the behavior of the former, it is necessary
> to document the behavior of the latter regardless.
>
> The attached patch does the above for the master head. If we apply
> this approach to older versions, I can adapt and create similar
> patches for them.

Yes, this patch shows the approach I was asking about.

Andres, what do you think about this idea? I wonder if you just
momentarily forgot about temporary relations when coding
RelidByRelfilenumber -- because for that function to give well-defined
answers with temporary relations included, it would need the backend
ID as an additional argument.

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Aw: BUG #18312: libpq: PQsetdbLogin() not thread-safe
Next
From: Andrei Lepikhov
Date:
Subject: Re: v17 Possible Union All Bug