Logical replication breaks: "unexpected duplicate for tablespace 0, relfilenode 2774069304" - Mailing list pgsql-general

From Kouber Saparev
Subject Logical replication breaks: "unexpected duplicate for tablespace 0, relfilenode 2774069304"
Date
Msg-id CAN4RuQuKGmUD4-OcJeC7t-p=yN7Pvwry_pVCigio-_LdsXpkHw@mail.gmail.com
Whole thread Raw
Responses Re: Logical replication breaks: "unexpected duplicate for tablespace 0, relfilenode 2774069304"  (Michael Paquier <michael@paquier.xyz>)
List pgsql-general
We are using logical replication in a quite busy environment. On the publisher side temporary tables are created and dropped all the time (due to some Zend Entity Framework extension "optimisation"), thus bloating heavily the system catalogs (among others).

At some point all our logical replication subscribers / replication slots drop, because of an error:

"could not receive data from WAL stream: ERROR:  unexpected duplicate for tablespace 0, relfilenode 2774069304"

The table for this file node is not even included in any of the publications we have. I've found a similar issue described [1] before, so I was wondering whether this patch is applied? Our subscriber database is PostgreSQL 16.1 and the publisher - PostgreSQL 15.4.

What quick solution would fix the replication? Repack of the table? Reload of the database? Killing some backends?

We rely heavily on this feature in a production environment and cannot just leave the subscriber side out of sync.

Regards,
--
Kouber Saparev

[1] 

pgsql-general by date:

Previous
From: Johnathan Tiamoh
Date:
Subject: what do you do after pg_walreset ?
Next
From: Laurenz Albe
Date:
Subject: Re: what do you do after pg_walreset ?