Re: "unexpected duplicate for tablespace" problem in logical replication

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, wangsh(dot)fnst(at)fujitsu(dot)com, osumi(dot)takamichi(at)fujitsu(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: "unexpected duplicate for tablespace" problem in logical replication
Date: 2025-08-21 21:36:56
Message-ID: aKeReH7_GwoMUoLi@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Aug 21, 2025 at 07:54:55PM +0530, Ashutosh Bapat wrote:
> How about the following:
>
> ---
> Map a relation's (tablespace, relfilenumber) to a relation's oid and
> cache the result.
>
> A temporary relation may have the same relfilenumber as a permanent
> relation, or as other temporary relations. In order to uniquely
> identify a temporary relation we also need the
> proc number of the backend which created it. The proc number is not
> available to this function. Hence ignore temporary relations.
>
> Returns InvalidOid if no permanent relation matching the criteria
> could be found.
> ---

That's simpler.

> Said that if you insist on adding just "Temporary relations are not
> supported", we can go ahead with it.

That would be simpler as well, providing the information.

> Vignesh, since you are the original author of the patch, do you want
> to take care of addressing the comments? Otherwise I can.

It's fine. I am going to take care of that.
--
Michael

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Thomas Munro 2025-08-22 02:16:40 Re: BUG #19028: INITDB fails post-bootstrap initialization with FATAL " " is not a valid binary digit at character 1
Previous Message Ashutosh Bapat 2025-08-21 14:24:55 Re: "unexpected duplicate for tablespace" problem in logical replication