Re: pgpool question - Mailing list pgsql-hackers

From Jeff Hoffmann
Subject Re: pgpool question
Date
Msg-id 422F35EF.2090705@propertykey.com
Whole thread Raw
In response to Re: pgpool question  (Oleg Bartunov <oleg@sai.msu.su>)
List pgsql-hackers
Oleg Bartunov wrote:
> On Wed, 9 Mar 2005, Jeff Hoffmann wrote:
> 
>> Oleg Bartunov wrote:
>>
>>> I'm experimenting with pgpool 2.51 on my Linux box runnung
>>> two postgresql backends: pg74:5432 and pg801:5433
>>>
>>> I configured pgpool to use pg74:5432 as primary backend and 
>>> pg801:5433 as second one. Pgpool is running on default port (9999) and
>>> I configured my web application to use it, so I could start/stop 
>>> backends
>>> without disturbing client (web browser).
>>>
>>> When I stop primary backend (pg74:5432) pgpool switched to backend
>>>     failover from (5432) to (5433) done
>>> but when I start primary and stopped secondary backend pgpool
>>> never switched back to primary backend as expected ! I see bogus 
>>> message like:
>>>     starting failover from (5433) to (5433)
>>>
>>> What I'm doing  wrong ?
>>
>>
>> I don't think anything.  I could be wrong, but my understanding is 
>> that if the primary goes down, you have to restart pgpool after 
>> primary comes back up.  It doesn't toggle back and forth from primary 
>> <-> secondary when necessary, it only goes primary->secondary.  I 
>> played with pgpool for a while and came up with effectively the same 
>> confused question.
> 
> 
> Seems, limited functionality.  But, then I don't understand
> switchover options ([-s {m[aster]|s[econdary]] switch).
> What's '-s m switch' for ?

That was exactly my question so I sent a message on the pgpool mailing 
list.  I was trying to set up a managed downtime system where I would 
switch from master to secondary, update the master, switch back to 
master & update the secondary.  My plan was to use the "-s" switch to do 
that, but I could only switch from master to secondary, I couldn't 
switch back to master using that switch.  I was told that I'd have to 
restart pgpool to get back to the master, which is effectively what your 
question was about.  I'm assuming the same mechanism is at work in both 
cases.

-- 
Jeff Hoffmann
jeff@propertykey.com


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: fool-toleranced optimizer
Next
From: Thomas Hallgren
Date:
Subject: Runtime accepting build discrepancies