<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px;">
<div>
<div>
<div style="font-family: Calibri, sans-serif;">Everything is running on the same server. One subscriber instance has been shut down.</div>
<div style="font-family: Calibri, sans-serif;"><br>
</div>
<div>
<div><font face="Courier">test_db=# select * from _sloncluster.sl_status;</font></div>
<div><font face="Courier">-[ RECORD 1 ]-------------+------------------------------</font></div>
<div><font face="Courier">st_origin | 1</font></div>
<div><font face="Courier">st_received | 3</font></div>
<div><font face="Courier">st_last_event | 5000000264</font></div>
<div><font face="Courier">st_last_event_ts | 2016-02-29 09:58:24.455544-06</font></div>
<div><font face="Courier">st_last_received | 5000000175</font></div>
<div><font face="Courier">st_last_received_ts | 2016-02-29 09:43:47.461217-06</font></div>
<div><font face="Courier">st_last_received_event_ts | 2016-02-29 09:43:38.254386-06</font></div>
<div><font face="Courier">st_lag_num_events | 89</font></div>
<div><font face="Courier">st_lag_time | 00:14:55.35601</font></div>
<div><font face="Courier">-[ RECORD 2 ]-------------+------------------------------</font></div>
<div><font face="Courier">st_origin | 1</font></div>
<div><font face="Courier">st_received | 2</font></div>
<div><font face="Courier">st_last_event | 5000000264</font></div>
<div><font face="Courier">st_last_event_ts | 2016-02-29 09:58:24.455544-06</font></div>
<div><font face="Courier">st_last_received | 5000000176</font></div>
<div><font face="Courier">st_last_received_ts | 2016-02-29 09:43:52.284371-06</font></div>
<div><font face="Courier">st_last_received_event_ts | 2016-02-29 09:43:48.258894-06</font></div>
<div><font face="Courier">st_lag_num_events | 88</font></div>
<div><font face="Courier">st_lag_time | 00:14:45.351502</font></div>
</div>
<div style="font-family: Calibri, sans-serif;"><br>
</div>
<div style="font-family: Calibri, sans-serif;">Thanks,</div>
<div style="font-family: Calibri, sans-serif;">--Rob</div>
<div style="font-family: Calibri, sans-serif;">
<div id="MAC_OUTLOOK_SIGNATURE"></div>
</div>
</div>
</div>
<div style="font-family: Calibri, sans-serif;"><br>
</div>
<span id="OLK_SRC_BODY_SECTION" style="font-family: Calibri, sans-serif;">
<div style="font-family:Calibri; font-size:12pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Melvin Davidson <<a href="mailto:melvin6925@yahoo.com">melvin6925@yahoo.com</a>><br>
<span style="font-weight:bold">Reply-To: </span>Melvin Davidson <<a href="mailto:melvin6925@yahoo.com">melvin6925@yahoo.com</a>><br>
<span style="font-weight:bold">Date: </span>Friday, February 26, 2016 at 8:19 PM<br>
<span style="font-weight:bold">To: </span>Rob Brucks <<a href="mailto:rob.brucks@rackspace.com">rob.brucks@rackspace.com</a>>, "<a href="mailto:slony1-general@lists.slony.info">slony1-general@lists.slony.info</a>" <<a href="mailto:slony1-general@lists.slony.info">slony1-general@lists.slony.info</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [Slony1-general] Replication Lag?<br>
</div>
<div><br>
</div>
<div>
<div>
<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 <<a href="mailto:rob.brucks@rackspace.com">rob.brucks@rackspace.com</a>><br>
<b><span style="font-weight: bold;">To:</span></b> "<a href="mailto:slony1-general@lists.slony.info">slony1-general@lists.slony.info</a>" <<a href="mailto:slony1-general@lists.slony.info">slony1-general@lists.slony.info</a>>
<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: 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.<br>
<br>
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.<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. 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. 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>
CLUSTER NAME = slony;<br>
NODE 1 ADMIN CONNINFO = 'dbname=test_db host=/tmp port=5432 user=slony';<br>
NODE 2 ADMIN CONNINFO = 'dbname=test_db host=/tmp port=5433 user=slony';<br>
NODE 3 ADMIN CONNINFO = 'dbname=test_db host=/tmp port=5434 user=slony';<br>
<br>
############ CLUSTERS<br>
<br>
INIT CLUSTER (ID = 1, COMMENT = 'Master');<br>
<br>
<br>
############ NODES<br>
<br>
STORE NODE (ID = 2, COMMENT = 'Slave1', EVENT NODE = 1);<br>
STORE NODE (ID = 3, COMMENT = 'Slave2', EVENT NODE = 1);<br>
<br>
<br>
############ PATHS<br>
<br>
STORE PATH (SERVER = 1, CLIENT = 2, CONNINFO = 'dbname=test_db host=/tmp port=5432 user=slony');<br>
STORE PATH (SERVER = 1, CLIENT = 3, CONNINFO = 'dbname=test_db host=/tmp port=5432 user=slony');<br>
STORE PATH (SERVER = 2, CLIENT = 1, CONNINFO = 'dbname=test_db host=/tmp port=5433 user=slony');<br>
STORE PATH (SERVER = 2, CLIENT = 3, CONNINFO = 'dbname=test_db host=/tmp port=5433 user=slony');<br>
STORE PATH (SERVER = 3, CLIENT = 1, CONNINFO = 'dbname=test_db host=/tmp port=5434 user=slony');<br>
STORE PATH (SERVER = 3, CLIENT = 2, CONNINFO = 'dbname=test_db host=/tmp port=5434 user=slony');<br>
<br>
<br>
############ SETS<br>
<br>
CREATE SET (ID = 1, ORIGIN = 1, COMMENT = 'TEST Set 1');<br>
<br>
############ SEQUENCES<br>
<br>
SET ADD SEQUENCE (SET ID = 1, ORIGIN = 1, ID = 1, FULLY QUALIFIED NAME = '"public"."test_seq"');<br>
<br>
############ TABLES<br>
<br>
SET ADD TABLE (SET ID = 1, ORIGIN = 1, ID = 2, FULLY QUALIFIED NAME = '"public"."test"');<br>
<br>
############ SUBSCRIPTIONS<br>
<br>
SUBSCRIBE SET (ID = 1, PROVIDER = 1, RECEIVER = 2, FORWARD = YES);<br>
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"> 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. 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>
</div>
</div>
</span>
</body>
</html>