Initial phase of the situation, I have following architecture
PG 16.x Master --> streaming replication --> PG 16.x Replica --> streaming replication --> PG 16.x second replica
and then
I have create publication with couple of schemas in master server and then created logical replication slot on first replica
and then I used select pg_promote function on second replica and also applied pg_replication_slot_advance command in first replica
There were no errors up to this point
So my architecture turned into following state
PG 16.x Master --> streaming replication --> PG 16.x Replica --> logical replication --> PG 16.x Subscriber
And then I have created subscription on subscriber server. When I checked logs in subscriber, I saw following errors on some tables
ERROR: duplicate key value violates unique constraint "sdevi_cst_did_key".
When I check this constraints and it's table on master server there is no key value violates issue.
So why I am getting this error in subscriber, even there is no related issue in the publisher
Thanks
copy_data = FALSE
. Hard to tell, because you don't show us the commands you used.