[pgpool-general: 2594] Re: pgpool-wd problems adding a third backend node
nagata at sraoss.co.jp
Mon Feb 24 21:05:31 JST 2014
If you are using pgpool with master-slave mode and streaming-replication,
the tutorial may be helpful to setup.
This includes scripts for online-recovery configuration.
To add 3rd backend, what you need to do are:
1) Install PostgreSQL to the 3rd server. postgres should be stopped.
2) Add the backend information to all pgpools' pgpool.conf.
3) Reload all pgpools (You don't need to restart them.)
$ pgpool reload
4) Do online-recovery at one pgpool.
$ pcp_recovery 0 localhost 9898 user pass 2
If this doesn't work, please infrom the actual operation which you did
and all pgpool.conf and their log messages.
On Tue, 11 Feb 2014 16:13:08 +0100
Attila Heidrich <attila.heidrich at gmail.com> wrote:
> Sorry for the mistypings, the correct inserted section is:
> backend_hostname2 = 'pool-3'
> backend_port2 = 5433
> backend_weight2 = 1
> backend_data_directory2 = '/var/lib/postgresql/9.3/main/'
> backend_flag2 = 'ALLOW_TO_FAILOVER'
> After once this operation killed the replication, I can not easily ever
> start it again with just two nodes either.
> and a different question: how the configurations of the pools being
> clustered will be replicated? Is the only way doing it by hand?
> [[ pgpooladmin for example doesn't do anything with the configs on the
> failover pgpools. It cannot even detect if pgpool is running, or not, but I
> guess this is because the pid file is not created at all, which is a
> problem too, but I don't really care pgpooladmin at the moment. ]]
> 2014-02-11 15:21 GMT+01:00 Attila Heidrich <attila.heidrich at gmail.com>:
> > Dear All!
> > I have read many docs, but still have totally silly problems, like the
> > following:
> > I run two Debian 7.3 boxes, with postgresql 9.3 and pgpool 3. on each.
> > I use pgpool's own wd mech.
> > It seems to work fine in this scenario, but everything fails when I add a
> > 3rd backend node.
> > I just insert the following section into both pgpool.conf:
> > backend_hostname2 = 'pool-3'
> > backend_port1 = 5433
> > backend_weight1 = 1
> > backend_data_directory1 = '/var/lib/postgresql/9.3/main/'
> > backend_flag1 = 'ALLOW_TO_FAILOVER'
> > after the first and the second, which are the same, just with
> > backend_hostname0 = 'pool-1', and backend_hostname1 = 'pool-2'
> > respectively. pgpool replication works with the two nodes.
> > Stop pgpools
> > Stop database
> > rsync the master database to the 3rd node (I would like to have online
> > sync, but always got backend_error, so I have decided to start with offline
> > sync)
> > start all databases
> > start pgpool#1
> > start pgpool#2 (I have experienced that starting at once doesn't make any
> > sense, it usually doesn't work such way, some, or all of the pgpool nodes
> > should be restarted)
> > And pgpool stops replicating, although the pools see each other, wd seems
> > to work. Any DB operation goes only the db on the active pool node.
> > What do I do wrong??
> > Regards,
> > Attila
Yugo Nagata <nagata at sraoss.co.jp>
More information about the pgpool-general