<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr">On Tue, Jun 12, 2018 at 5:59 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">Ok, I have done. The new column name is "last_status_change" as<br>
suggested. However pcp_node_info and pgpool_adm are not updated yet.<br>
<br></blockquote><div>Many thanks :-)</div><div><br></div><div>Best Regards</div><div>Muhammad Usama</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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>
> Hi Ishii-San,<br>
> <br>
> On Tue, Jun 12, 2018 at 5:47 AM Tatsuo Ishii <<a href="mailto:ishii@sraoss.co.jp" target="_blank">ishii@sraoss.co.jp</a>> wrote:<br>
> <br>
>> Hi Usama,<br>
>><br>
>> > Hi Ishii-San<br>
>> ><br>
>> > Thanks for the patch and I totally second the Peng's comment that it is a<br>
>> > very useful feature<br>
>> > to have and will have many practical use cases.<br>
>> > I have couple of small comments on the attached patch<br>
>> > One is I think it would be good idea to also include this last status<br>
>> > changed column in pcp_node_info'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 "backend role" column.<br>
>><br>
>><br>
> Yes that is one issue, and I believe we need to plan out something for<br>
> Pgpool-adm<br>
> enhancement to bring it upto Pgpool core version.<br>
> I am just thinking Is it possible if we add the last_status_change column<br>
> in pcp_node_info<br>
> but Pgpool_adm keep ignoring it until it is updated<br>
> <br>
> <br>
> <br>
>> > and secondly what do you think about renaming the "status_changed" column<br>
>> > name to "last status change" in<br>
>> > show pool_nodes output?<br>
>><br>
>> Maybe but "last status change" is not appropreate column name. It<br>
>> should be "last_status_change" or something like that.<br>
>><br>
> <br>
> Sorry for the type. I actually meant "last_status_change" :-)<br>
> <br>
> Thanks<br>
> Best regards<br>
> Muhammad Usama<br>
> <br>
>><br>
>> > Thanks<br>
>> > Best Regards<br>
>> > Muhammad Usama<br>
>> ><br>
>> ><br>
>> > On Mon, Jun 11, 2018 at 7:14 PM Tatsuo Ishii <<a href="mailto:ishii@sraoss.co.jp" target="_blank">ishii@sraoss.co.jp</a>> wrote:<br>
>> ><br>
>> >> > Hi Ishii-san,<br>
>> >> ><br>
>> >> > I think this will be useful to show the last state change timestamp.<br>
>> >><br>
>> ><br>
>> > Totally agree. This will be a very useful feature to have.<br>
>> ><br>
>> >><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>
>> >><br>
>><br>
</blockquote></div></div>