[pgpool-general: 4554] Re: show pool_nodes status - on unusual test scenario

Shay Cohavi cohavisi at gmail.com
Tue Mar 15 23:46:00 JST 2016


Hi,
I think its an mandatory feature to monitor *both* DB nodes states every x
sec. in order to avoid human mistakes (or errors).
in the other hand, if the secondary node gets shutdown (stopping Postgres)
, the pgpool does reports the node in state 3.


Thanks,
Shay C

On Tue, Mar 15, 2016 at 3:18 PM, Muhammad Usama <m.usama at gmail.com> wrote:

>
>
> On Tue, Mar 15, 2016 at 5:59 PM, Shay Cohavi <cohavisi at gmail.com> wrote:
>
>> Hi Muhammad,
>> Thanks for your replay...
>>
>> I'm familiar with the *pcp_promote_node* command and I'm using it when
>> necessary!
>> but *if* (by mistake) someone promoted manually the secondary
>> node....does the pgpool notice it and change its state? report an error?
>> get it out of the pool?
>>
>
> No pgpool does not continuously monitor the node's master or standby
> status. It only scans the node master or secondary state at startup or when
> the attached master goes down.
>
>
>>
>> Thnaks
>>
>> On Tue, Mar 15, 2016 at 2:23 PM, Muhammad Usama <m.usama at gmail.com>
>> wrote:
>>
>>>
>>>
>>> On Tue, Mar 15, 2016 at 5:13 PM, Shay Cohavi <cohavisi at gmail.com> wrote:
>>>
>>>> Hi,
>>>> During my tests on my pgpool setup (2 nodes is master/slave and
>>>> streaming replication), I have notice a troubled response via the pgpool
>>>> server.
>>>>
>>>> 1. DB nodes in master/slave state (streaming replication):
>>>> # psql -U postgres -h 192.168.15.59 -p 9999 -c "show pool_nodes;"
>>>> Password for user postgres:
>>>>  node_id | hostname | port | status | lb_weight |  role
>>>> ---------+----------+------+--------+-----------+---------
>>>>  0       | 1.1.1.55 | 5432 | 2      | 0.500000  | primary
>>>>  1       | 1.1.1.56 | 5432 | 2      | 0.500000  | standby
>>>> (2 rows)
>>>>
>>>> 2. *test scenario* --- for some reason, if the 'standby' node
>>>> (1.1.1.56) is being promoted* manually by user *(touch trigger file);
>>>> the pgpool doesn't change its state and not put it outside of the
>>>> pool.....(split brain)
>>>>
>>>> on 1.1.1.56:
>>>> # touch /home/postgres/databases/my_db/trigger
>>>>
>>>> #  psql -U postgres -h 192.168.15.59 -p 9999 -c "show pool_nodes;"
>>>>  node_id | hostname | port | status | lb_weight |  role
>>>> ---------+----------+------+--------+-----------+---------
>>>>  0 | 1.1.1.55 | 5432 | 2      | 0.500000  | primary
>>>>  1 | 1.1.1.56 | 5432 | 2      | 0.500000  | standby
>>>>
>>>> Does the pgpool monitor the *standby* node after pgpool startup??
>>>>
>>>
>>> If you want to promote a standby node to the master node you need to do
>>> it manually. *pcp_promote_node* is used for the purpose.
>>> http://www.pgpool.net/docs/latest/pgpool-en.html#pcp_promote_node
>>>
>>> Regards
>>> Muhammad Usama
>>>
>>>
>>>>
>>>>
>>>>
>>>> can you please advice?
>>>>
>>>> Thanks,
>>>> cohavisi
>>>>
>>>>
>>>> _______________________________________________
>>>> pgpool-general mailing list
>>>> pgpool-general at pgpool.net
>>>> http://www.pgpool.net/mailman/listinfo/pgpool-general
>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20160315/948f99e6/attachment-0001.html>


More information about the pgpool-general mailing list