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.

Home Page:http://2ndquadrant.com/en/resources/pglogical/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

hebusy opened this issue · comments

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?