<div dir="ltr">Hi Ishii-San<div><br></div><div>Thanks for the patch and I totally second the Peng's comment that it is a very useful feature</div><div>to have and will have many practical use cases.</div><div>I have couple of small comments on the attached patch</div><div>One is I think it would be good idea to also include this last status changed column in pcp_node_info's output.</div><div>and secondly what do you think about renaming the "<span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">status_changed" column name to "last status change" in</span></div><div><span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">show pool_nodes output</span>?</span></div><div><br></div><div>Thanks</div><div>Best Regards</div><div>Muhammad Usama</div><div><br><br><div class="gmail_quote"><div dir="ltr">On Mon, Jun 11, 2018 at 7:14 PM Tatsuo Ishii <<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> Hi Ishii-san,<br>
> <br>
> I think this will be useful to show the last state change timestamp.<br></blockquote><div><br></div><div>Totally agree. This will be a very useful feature to have. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thanks. Attached is a patch to implement this. Still documentations<br>
need to be updated.<br>
<br>
> When pgpool-II starts, the timestamp is set to time the startup<br>
> time. After that whenever the status is changed, time timestamp is<br>
> recorded and shown.<br>
<br>
Here "status" means not only "up" and "down" etc. but primary node<br>
changes. For example suppose there are two nodes 0 (primary) and 1<br>
(standby). If node 0 goes down and node 1 is promoted to primary, the<br>
time stamp of node 1 is updated. Though the up/down status of node 1<br>
is not changed (up->up), it becomes primary from standby.<br>
<br>
Here is an example output of "show pool_nodes".<br>
<br>
test=# show pool_nodes;<br>
-[ RECORD 1 ]-----+--------------------<br>
node_id | 0<br>
hostname | /tmp<br>
port | 11002<br>
status | up<br>
lb_weight | 0.500000<br>
role | standby<br>
select_cnt | 0<br>
load_balance_node | true<br>
replication_delay | 0<br>
status_changed | 2018-06-11 23:11:45<br>
-[ RECORD 2 ]-----+--------------------<br>
node_id | 1<br>
hostname | /tmp<br>
port | 11003<br>
status | up<br>
lb_weight | 0.500000<br>
role | primary<br>
select_cnt | 0<br>
load_balance_node | false<br>
replication_delay | 0<br>
status_changed | 2018-06-11 23:11:45<br>
<br>
Best regards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
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>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
_______________________________________________<br>
pgpool-hackers mailing list<br>
<a href="mailto:pgpool-hackers@pgpool.net" target="_blank">pgpool-hackers@pgpool.net</a><br>
<a href="http://www.pgpool.net/mailman/listinfo/pgpool-hackers" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-hackers</a><br>
</blockquote></div></div></div>