[pgpool-hackers: 2830] Re: Proposal: Add last state change timestamp to "show pool_nodes"

Tatsuo Ishii ishii at sraoss.co.jp
Tue Jun 12 21:59:15 JST 2018


Ok, I have done. The new column name is "last_status_change" as
suggested. However pcp_node_info and pgpool_adm are not updated yet.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

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


More information about the pgpool-hackers mailing list