2ndQuadrant / pglogical

Logical Replication extension for PostgreSQL 15, 14, 13, 12, 11, 10, 9.6, 9.5, 9.4 (Postgres), providing much faster replication than Slony, Bucardo or Londiste, as well as cross-version upgrades.
http://2ndquadrant.com/en/resources/pglogical/
Other
987 stars 153 forks source link

hi,I have a problem inserting the sequence when viewing bidirectional replication. #448

Closed hebusy closed 9 months ago

hebusy commented 9 months ago

Specific operation: I created a table

create table tb3(id serial primary key, name int);

on both sides of the two-way replication, added the tables to the databases at both ends and added them to the replication set, and then added sequence (tb3_id_seq) to both ends. database into the replication set, then insert data

insert into tb3(name) values(1);

in database A, perform the same insert data operation in database B, and execute

select nextval('tb3_id_seq');

and thenThere is a problem. The value of tb3_id_seq has increased a lot. It seems that tb3_id_seq has been copied between the two databases. What is the situation?