Hello,

I have a strange error when using logical replication between a 11.2 (I know!) 
source database and a 12.3 target.

If I create the publication with all needed tables (about 50) at once, I get 
"duplicate key value violates unique constraint xxx_pkey" errors during the 
initial replication (when creating the subscription).

When create the publication only with a few tables, the initial data sync works 
without problems.
To replicate all tables, I add the tables incrementally to the publication, and 
refresh the subscription.

If I do it like that (step-by-step) everything works fine. Tables that 
generated the "duplicate key value" error previously will replicate just fine. 
The tables are quite small, some of them less then 100 rows.

The table definitions and primary keys are 100% identical between the two 
systems.

However all tables where this error occurs, have a varchar(100) column as part 
of the PK definition (don't ask).

The values in the PK columns are 7-bit ASCII only. Both servers are running 
CentOS 7.x and use UTF-8 as the encoding.

If this was a glibc version issue between the two operating systems, then I 
would expect the failure to be consistent, not depending on the amount of 
tables for the initial replication.

I have seen that there were several bugfixes between 11.2 and 11.8 regarding 
logical replication (including some index related fixes). But I am unsure if 
they related to 11.2 being the publisher or subscriber

Could this indeed be caused by the outdated 11.2 on the publisher side?
Is there anything else I could check to identify the root cause?

As I can replicate the tables without problems, this isn't a big issue for me 
right now, but I would like to know what the root cause is.

Thanks
Thomas


Reply via email to