[pgpool-general: 4614] Re: initial setup help

Yugo Nagata nagata at sraoss.co.jp
Tue Apr 5 10:40:39 JST 2016


Did you confirm the result of pcp_node_info command or "show pool_nodes"? 
I think the status of the primary node is marked as "3" which means 
"node is down". Furthermore, the alive node was still standby since
failover was not configured.

pgpool-II has the internal node status which memories that the master
node is down, so clients connect always to standby.

You can failback the stopped master node by pcp_attach_node or
restarting pgpool with -D option, which discards the internal status. 

On Mon, 4 Apr 2016 14:34:48 -0600
CS DBA <cs_dba at consistentstate.com> wrote:

> Hi all;
> I've setup a simple pg pool install:
> 1) installed postgresql95 postgresql95-server and postgresql95-contrib 
> via the yum repo file found at yum.postgresql.org (centOS 6 x86_64)
> 2) setup 2 nodes (VM's) with postgres 9.5 as a master/slave (streaming 
> replication and verified replication is working
> 3) installed pgpool on a 3rd VM:
> yum install pgpool-II-95-extensions pgpoolAdmin pgpool-II-95
> 4) configured a basic pgpool.conf file based on a copy of 
> pgpool.conf.sample-stream (in /etc/pgpool-II-95)
> 5) setup a basic pool_passwd file using the hash for the postgres user's 
> passwd
> 6) setup a basic pcp.conf file with the same postgres user's password hash
> 7) was able to connect via psql -p 9999 -h localhost (on the pgpool VM
> 8) enabled the heartbeat in the pgpool.conf file but did not setup 
> failover / failback commands
> 9) stopped the postgresql master db
> 10) my connection to pgpool (step 7 above) printed this:
> /server closed the connection unexpectedly//
> //        This probably means the server terminated abnormally//
> //        before or while processing the request.//
> //The connection to the server was lost. Attempting reset: Succeeded./
> 11) restarted the backend master
> Now I can connect to pgpool (as in step 7 above) but I always connect to 
> the slave. How can I tell pgpool to return to connecting to the master?
> Running a pcp_node_count shows 2 but I suspect I'm skipping a 'failback' 
> step of some kind.
> thanks in advance

Yugo Nagata <nagata at sraoss.co.jp>

More information about the pgpool-general mailing list