Rob Brucks rob.brucks at rackspace.com
Fri Feb 26 12:51:14 PST 2016
I have a fairly simple test cluster, three PG instances running on different ports:  a master and two slave DBs both subscribed to the master.  Everything is running on the same server (it's a playground), so I have three PG instances (ports 5432, 5433, 5434; connecting via sockets in /tmp) and a slony daemon for each instance.

I'm running Postgres 9.3.9 and slony1 2.2.4 on Centos 6.7 x86_64.  Both postgres and slony were installed via yum using the PGDG repo.

I used the config below to initialize a very simple replication setup of only one table and one sequence.

My problem is that if I shut down just one slave postgres instance then sl_status on the master instance shows replication stalling on both slave DBs, instead of just one.

But, if I insert some test data into the master DB, I see the data show up on the remaining active slave.  So replication to the remaining slave DB is obviously working.

We use sl_status to monitor replication so we need it to accurately report lag if there's an issue.  The Slony 1.2 version we used before did not behave this way, it accurately reported which slave was not replicating.

Why does sl_status report lag on the active slave even though replication appears to be working fine?

Do I have a misconfiguration somewhere?

Thanks,
Rob


Here's my slony config:


      CLUSTER NAME = slony;
      NODE 1 ADMIN CONNINFO = 'dbname=test_db host=/tmp port=5432 user=slony';
      NODE 2 ADMIN CONNINFO = 'dbname=test_db host=/tmp port=5433 user=slony';
      NODE 3 ADMIN CONNINFO = 'dbname=test_db host=/tmp port=5434 user=slony';

############ CLUSTERS

      INIT CLUSTER (ID = 1, COMMENT = 'Master');


############ NODES

      STORE NODE (ID = 2, COMMENT = 'Slave1', EVENT NODE = 1);
      STORE NODE (ID = 3, COMMENT = 'Slave2', EVENT NODE = 1);


############ PATHS

      STORE PATH (SERVER = 1, CLIENT = 2, CONNINFO = 'dbname=test_db host=/tmp port=5432 user=slony');
      STORE PATH (SERVER = 1, CLIENT = 3, CONNINFO = 'dbname=test_db host=/tmp port=5432 user=slony');
      STORE PATH (SERVER = 2, CLIENT = 1, CONNINFO = 'dbname=test_db host=/tmp port=5433 user=slony');
      STORE PATH (SERVER = 2, CLIENT = 3, CONNINFO = 'dbname=test_db host=/tmp port=5433 user=slony');
      STORE PATH (SERVER = 3, CLIENT = 1, CONNINFO = 'dbname=test_db host=/tmp port=5434 user=slony');
      STORE PATH (SERVER = 3, CLIENT = 2, CONNINFO = 'dbname=test_db host=/tmp port=5434 user=slony');


############ SETS

      CREATE SET (ID = 1, ORIGIN = 1, COMMENT = 'TEST Set 1');

############ SEQUENCES

      SET ADD SEQUENCE (SET ID = 1, ORIGIN = 1, ID = 1, FULLY QUALIFIED NAME = '"public"."test_seq"');

############ TABLES

      SET ADD TABLE (SET ID = 1, ORIGIN = 1, ID = 2, FULLY QUALIFIED NAME = '"public"."test"');

############ SUBSCRIPTIONS

      SUBSCRIBE SET (ID = 1, PROVIDER = 1, RECEIVER = 2, FORWARD = YES);
      SUBSCRIBE SET (ID = 1, PROVIDER = 1, RECEIVER = 3, FORWARD = YES);




More information about the Slony1-general mailing list