<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:24px"><br><div class="qtdSeparateBR"><br><br></div><div style="display: block;" id="yui_3_16_0_1_1456538918802_5774" class="yahoo_quoted">  <div id="yui_3_16_0_1_1456538918802_5773" style="font-family: Courier New, courier, monaco, monospace, sans-serif; font-size: 24px;"> <div id="yui_3_16_0_1_1456538918802_5772" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div id="yui_3_16_0_1_1456538918802_5771" dir="ltr"> <font id="yui_3_16_0_1_1456538918802_5825" face="Arial" size="2"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Rob Brucks &lt;rob.brucks@rackspace.com&gt;<br> <b><span style="font-weight: bold;">To:</span></b> "slony1-general@lists.slony.info" &lt;slony1-general@lists.slony.info&gt; <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, February 26, 2016 3:51 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> [Slony1-general] Replication Lag?<br> </font> </div> <div id="yui_3_16_0_1_1456538918802_5775" class="y_msg_container"><br>I have a fairly simple test cluster, three PG instances running on different ports:&nbsp; a master and two slave DBs both subscribed to the master.&nbsp; 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.<br><br>I'm running Postgres 9.3.9 and slony1 2.2.4 on Centos 6.7 x86_64.&nbsp; Both postgres and slony were installed via yum using the PGDG repo.<br><br>I used the config below to initialize a very simple replication setup of only one table and one sequence.<br><br>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.<br><br>But, if I insert some test data into the master DB, I see the data show up on the remaining active slave.&nbsp; So replication to the remaining slave DB is obviously working.<br><br>We use sl_status to monitor replication so we need it to accurately report lag if there's an issue.&nbsp; The Slony 1.2 version we used before did not behave this way, it accurately reported which slave was not replicating.<br><br>Why does sl_status report lag on the active slave even though replication appears to be working fine?<br><br>Do I have a misconfiguration somewhere?<br><br>Thanks,<br>Rob<br><br><br>Here's my slony config:<br><br><br>&nbsp; &nbsp; &nbsp; CLUSTER NAME = slony;<br>&nbsp; &nbsp; &nbsp; NODE 1 ADMIN CONNINFO = 'dbname=test_db host=/tmp port=5432 user=slony';<br>&nbsp; &nbsp; &nbsp; NODE 2 ADMIN CONNINFO = 'dbname=test_db host=/tmp port=5433 user=slony';<br>&nbsp; &nbsp; &nbsp; NODE 3 ADMIN CONNINFO = 'dbname=test_db host=/tmp port=5434 user=slony';<br><br>############ CLUSTERS<br><br>&nbsp; &nbsp; &nbsp; INIT CLUSTER (ID = 1, COMMENT = 'Master');<br><br><br>############ NODES<br><br>&nbsp; &nbsp; &nbsp; STORE NODE (ID = 2, COMMENT = 'Slave1', EVENT NODE = 1);<br>&nbsp; &nbsp; &nbsp; STORE NODE (ID = 3, COMMENT = 'Slave2', EVENT NODE = 1);<br><br><br>############ PATHS<br><br>&nbsp; &nbsp; &nbsp; STORE PATH (SERVER = 1, CLIENT = 2, CONNINFO = 'dbname=test_db host=/tmp port=5432 user=slony');<br>&nbsp; &nbsp; &nbsp; STORE PATH (SERVER = 1, CLIENT = 3, CONNINFO = 'dbname=test_db host=/tmp port=5432 user=slony');<br>&nbsp; &nbsp; &nbsp; STORE PATH (SERVER = 2, CLIENT = 1, CONNINFO = 'dbname=test_db host=/tmp port=5433 user=slony');<br>&nbsp; &nbsp; &nbsp; STORE PATH (SERVER = 2, CLIENT = 3, CONNINFO = 'dbname=test_db host=/tmp port=5433 user=slony');<br>&nbsp; &nbsp; &nbsp; STORE PATH (SERVER = 3, CLIENT = 1, CONNINFO = 'dbname=test_db host=/tmp port=5434 user=slony');<br>&nbsp; &nbsp; &nbsp; STORE PATH (SERVER = 3, CLIENT = 2, CONNINFO = 'dbname=test_db host=/tmp port=5434 user=slony');<br><br><br>############ SETS<br><br>&nbsp; &nbsp; &nbsp; CREATE SET (ID = 1, ORIGIN = 1, COMMENT = 'TEST Set 1');<br><br>############ SEQUENCES<br><br>&nbsp; &nbsp; &nbsp; SET ADD SEQUENCE (SET ID = 1, ORIGIN = 1, ID = 1, FULLY QUALIFIED NAME = '"public"."test_seq"');<br><br>############ TABLES<br><br>&nbsp; &nbsp; &nbsp; SET ADD TABLE (SET ID = 1, ORIGIN = 1, ID = 2, FULLY QUALIFIED NAME = '"public"."test"');<br><br>############ SUBSCRIPTIONS<br><br>&nbsp; &nbsp; &nbsp; SUBSCRIBE SET (ID = 1, PROVIDER = 1, RECEIVER = 2, FORWARD = YES);<br>&nbsp; &nbsp; &nbsp; SUBSCRIBE SET (ID = 1, PROVIDER = 1, RECEIVER = 3, FORWARD = YES);<br><br>_______________________________________________<br>Slony1-general mailing list<br><a id="yui_3_16_0_1_1456538918802_5892" ymailto="mailto:Slony1-general@lists.slony.info" href="mailto:Slony1-general@lists.slony.info">Slony1-general@lists.slony.info</a><br><a id="yui_3_16_0_1_1456538918802_5893" href="http://lists.slony.info/mailman/listinfo/slony1-general" target="_blank">http://lists.slony.info/mailman/listinfo/slony1-general</a><br><div id="yui_3_16_0_1_1456538918802_5894"><br></div><div id="yui_3_16_0_1_1456538918802_5895"><br></div><div id="yui_3_16_0_1_1456538918802_5908" dir="ltr">========================================================================================================</div><div id="yui_3_16_0_1_1456538918802_5896">The config looks good.</div><div id="yui_3_16_0_1_1456538918802_5897">On which server are you running the slon process?<br></div><div id="yui_3_16_0_1_1456538918802_5669"><div id="yui_3_16_0_1_1456538918802_5906">What does your query for sl_status look like?<br></div><div id="yui_3_16_0_1_1456538918802_5907"><br></div></div><div id="yui_3_16_0_1_1456538918802_5713" class="signature"><div id="RTEContent"><font size="4"><span style="font-weight:bold;font-family:arial;color:rgb(0, 0, 255);">Melvin Davidson </span></font><br> <font size="3"> &nbsp;&nbsp;&nbsp; Cell 720-320-0155  <br></font><br><font id="yui_3_16_0_1_1456538918802_5910" style="font-weight:bold;" size="3"><span id="yui_3_16_0_1_1456538918802_5909" style="color:rgb(128, 0, 255);">I reserve the right to fantasize.&nbsp; Whether or not you </span><br style="color:rgb(128, 0, 255);"> <span style="color:rgb(128, 0, 255);">wish to share my fantasy is entirely up to you. </span><img data-id="0f61744f-8fa2-84ba-22c2-5485c6543afa" style="color:rgb(128, 0, 255);" src="http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/01.gif"><br>www.youtube.com/unusedhero<br style="color:rgb(128, 0, 255);"> </font><font size="3"><span style="font-weight:bold;font-family:courier;">Folk Alley - All Folk - 24 Hours a day </span><span style="font-weight:bold;font-family:courier;"><br>www.folkalley.com<br><br></span></font></div></div><br></div> </div> </div>  </div></div></body></html>