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

From Masahiko Sawada
Subject Re: "unexpected duplicate for tablespace" problem in logical replication
Date
Msg-id CAD21AoAcGtSOxp-6b7JWVNsyuefk2QwLN2aF2Ki+1bq+X=6fzA@mail.gmail.com
Whole thread Raw
In response to Re: "unexpected duplicate for tablespace" problem in logical replication  (Michael Paquier <michael@paquier.xyz>)
List pgsql-bugs
On Sun, Mar 17, 2024 at 11:35 PM Michael Paquier <michael@paquier.xyz> wrote:
>
> On Fri, Feb 02, 2024 at 10:49:17AM -0500, Robert Haas wrote:
> > 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.
>
>
> Ignoring temporary relations entirely makes sense: one cannot get a
> regclass from only a tablespace and a relfilenode, the persistence, as
> well as a backend ID would also be required.  I've not checked the
> patch in details, but it's to say that the idea to cut temporary
> relations sounds rather right here.

That makes sense to me too.

Regarding the patch, filtering by the relpersistence in
systable_getnext() loop seems to be good to me. Alternatively we can
add "relpersistence == RELPERSISTENCE_TEMP" to the scan key. The patch
would need regression tests too.

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com



pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: BUG #18550: Cross-partition update of a former inheritance parent leads to an assertion failure
Next
From: Mohammed Siddiqui
Date:
Subject: RE: Intermittent aggressive use of SWAP space by PostgreSQL despite availability of HUGE amounts of RAM for a small database.