<div dir="ltr"><br><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Hi Ishii-San,</span><div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jun 12, 2018 at 5:47 AM Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Usama,<br>
<br>
&gt; Hi Ishii-San<br>
&gt; <br>
&gt; Thanks for the patch and I totally second the Peng&#39;s comment that it is a<br>
&gt; very useful feature<br>
&gt; to have and will have many practical use cases.<br>
&gt; I have couple of small comments on the attached patch<br>
&gt; One is I think it would be good idea to also include this last status<br>
&gt; changed column in pcp_node_info&#39;s output.<br>
<br>
If we do that we need to maintain pgpool_adm as well. Pgpool_adm is<br>
already far behind from current pcp_node_info implementation since<br>
pgpool_adm lacks &quot;backend role&quot; column.<br>
<br></blockquote><div><br></div><div>Yes that is one issue, and I believe we need to plan out something for Pgpool-adm</div><div>enhancement to bring it upto Pgpool core version.</div><div>I am just thinking Is it possible if  we add the last_status_change column in pcp_node_info</div><div>but Pgpool_adm keep ignoring it until it is updated</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
&gt; and secondly what do you think about renaming the &quot;status_changed&quot; column<br>
&gt; name to &quot;last status change&quot;  in<br>
&gt; show pool_nodes output?<br>
<br>
Maybe but &quot;last status change&quot; is not appropreate column name. It<br>
should be &quot;last_status_change&quot; or something like that.<br></blockquote><div><br></div><div>Sorry for the type. I actually meant &quot;<span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">last_status_change&quot; :-)</span></div><div><span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Thanks</span></div><div><span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Best regards</span></div><div><span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Muhammad Usama</span></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
&gt; Thanks<br>
&gt; Best Regards<br>
&gt; Muhammad Usama<br>
&gt; <br>
&gt; <br>
&gt; On Mon, Jun 11, 2018 at 7:14 PM Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp" target="_blank">ishii@sraoss.co.jp</a>&gt; wrote:<br>
&gt; <br>
&gt;&gt; &gt; Hi Ishii-san,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I think this will be useful to show the last state change timestamp.<br>
&gt;&gt;<br>
&gt; <br>
&gt; Totally agree. This will be a very useful feature to have.<br>
&gt; <br>
&gt;&gt;<br>
&gt;&gt; Thanks. Attached is a patch to implement this. Still documentations<br>
&gt;&gt; need to be updated.<br>
&gt;&gt;<br>
&gt;&gt; &gt; When pgpool-II starts, the timestamp is set to time the startup<br>
&gt;&gt; &gt; time. After that whenever the status is changed, time timestamp is<br>
&gt;&gt; &gt; recorded and shown.<br>
&gt;&gt;<br>
&gt;&gt; Here &quot;status&quot; means not only &quot;up&quot; and &quot;down&quot; etc. but primary node<br>
&gt;&gt; changes. For example suppose there are two nodes 0 (primary) and 1<br>
&gt;&gt; (standby). If node 0 goes down and node 1 is promoted to primary, the<br>
&gt;&gt; time stamp of node 1 is updated. Though the up/down status of node 1<br>
&gt;&gt; is not changed (up-&gt;up), it becomes primary from standby.<br>
&gt;&gt;<br>
&gt;&gt; Here is an example output of &quot;show pool_nodes&quot;.<br>
&gt;&gt;<br>
&gt;&gt; test=# show pool_nodes;<br>
&gt;&gt; -[ RECORD 1 ]-----+--------------------<br>
&gt;&gt; node_id           | 0<br>
&gt;&gt; hostname          | /tmp<br>
&gt;&gt; port              | 11002<br>
&gt;&gt; status            | up<br>
&gt;&gt; lb_weight         | 0.500000<br>
&gt;&gt; role              | standby<br>
&gt;&gt; select_cnt        | 0<br>
&gt;&gt; load_balance_node | true<br>
&gt;&gt; replication_delay | 0<br>
&gt;&gt; status_changed    | 2018-06-11 23:11:45<br>
&gt;&gt; -[ RECORD 2 ]-----+--------------------<br>
&gt;&gt; node_id           | 1<br>
&gt;&gt; hostname          | /tmp<br>
&gt;&gt; port              | 11003<br>
&gt;&gt; status            | up<br>
&gt;&gt; lb_weight         | 0.500000<br>
&gt;&gt; role              | primary<br>
&gt;&gt; select_cnt        | 0<br>
&gt;&gt; load_balance_node | false<br>
&gt;&gt; replication_delay | 0<br>
&gt;&gt; status_changed    | 2018-06-11 23:11:45<br>
&gt;&gt;<br>
&gt;&gt; Best regards,<br>
&gt;&gt; --<br>
&gt;&gt; Tatsuo Ishii<br>
&gt;&gt; SRA OSS, Inc. Japan<br>
&gt;&gt; English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
&gt;&gt; Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; pgpool-hackers mailing list<br>
&gt;&gt; <a href="mailto:pgpool-hackers@pgpool.net" target="_blank">pgpool-hackers@pgpool.net</a><br>
&gt;&gt; <a href="http://www.pgpool.net/mailman/listinfo/pgpool-hackers" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-hackers</a><br>
&gt;&gt;<br>
</blockquote></div></div></div>