Thomas Kellerer schrieb am 13.07.2020 um 11:52:
> 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).
Turns out the problem was - once again - between the keyboard and the chair.
The script/job to initialize the database structure (to make sure primary and secondary are in sync) also includes
statementsto setup the lookup tables. So obviously the initial sync would fail for those tables. When I re-started
replicationI truncated all tables without re-running the setup script.
I wonder if it makes sense to add an "on conflict (pk) do nothing" option to the logical replication features ;)
Sorry for the noise
Thomas