2ndQuadrant / pglogical

Logical Replication extension for PostgreSQL 17, 16, 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
1.03k stars 154 forks source link

Monitoring Replication #239

Open ggraham-412 opened 4 years ago

ggraham-412 commented 4 years ago

We have set up a group of databases in a multi-master configuration using pglogical.

Are there any queries that can be used to monitor replication status, and provide us with an alert when replication is not working? A text-based query is fine; we can run the query periodically and pump the results into icinga2.

An example of what I'm looking for: we had an incompletely applied schema update a few weeks ago which blocked replication, but the problem was not caught for several hours. If this is not the best way to approach the problem, any alternatives would be appreciated.

MyqueWooMiddo commented 4 years ago

how do you build the multi-master cluster ? I 've built a 3-node cluster . all nodes are among master ,named A , B ,C A subscribes to B & C B subscribes to A & C C subscribes to A & B

If I insert a record in A , I can see that from B & C , but I update that record in B , there's no effect in A & C , while there's huge log flushed out like ' apply UPDATE from remote relation public.tbl in commit before 5/38C01B40' in all nodes

all nodes set pglogical.conflict_resolution to 'last_update_wins' already

So, could you teach me how to construct an workable multi-master cluster ?