[Pgpool-hackers] New patches for pcp_promote_node

Tatsuo Ishii ishii at sraoss.co.jp
Tue Mar 8 23:45:19 UTC 2011


>> BTW, I have a question: in my understanding, what pcp_promote_node
>> will do is a) create a protomoe request in shared memory area, b) do a
>> failover and restart child process. Promoting standby node to primary
>> seems out of scope of this tool.
>>
>> We can do this by 1)stop PostgreSQL primary node, 2) then create a
>> trigger file on the appropreate standby node 3) thsese steps can be
>> managed by fail over scrip of pgpool-II. So it seems we can do what
>> you want in current pgpool without using pcp_protomote_node.
>>
>> WHat's the use case for pcp_promoto_node?
> Yes, it is almost possible to do a lot of thing manually or by scripting
> with pgpool. This patch I think is useful because you have a command to
> tell to pgpool who should be the new master and let pgpool doing the
> right things internally. In this patch actually it don't do much more
> than you explain above but in the future we can take fine control of
> this step, like pausing client connections during the switch or anything
> else.

Thanks for clarification. That sounds reasonable to me.

BTW, after applying the patches I got following errors while doing
online recovery.  In my testing node 0 is down status and is the
recovery target. Node 1 is up and running as primary node. This worked
perfectly before applying your patches. Thoought?

2011-03-09 08:37:17 ERROR: pid 15531: health check failed. 0 th host /tmp at port 5433 is down
2011-03-09 08:37:17 LOG:   pid 15531: set 0 th backend down status
2011-03-09 08:37:17 LOG:   pid 15531: starting degeneration. shutdown host /tmp(5433)
2011-03-09 08:37:17 LOG:   pid 15531: execute command: /usr/local/etc/failover.sh 0 "/tmp" 5433 /usr/local/pgsql/data 1 0 "/tmp" 0
2011-03-09 08:37:17 LOG:   pid 15531: find_primary_node: 1 node is standby
2011-03-09 08:37:17 LOG:   pid 15531: find_primary_node: no primary node found
2011-03-09 08:37:17 LOG:   pid 15531: Primary node id saved: -1
2011-03-09 08:37:17 LOG:   pid 15531: failover done. shutdown host /tmp(5433)
2011-03-09 08:37:34 LOG:   pid 15566: starting recovering node 0
2011-03-09 08:37:34 ERROR: pid 15566: start_recover: could not connect master node.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


More information about the Pgpool-hackers mailing list