[Pgpool-general] Re: More pgpool options

Tatsuo Ishii ishii at sraoss.co.jp
Fri Oct 21 01:07:40 GMT 2005


> > Well, if your queries are all read-only SELECT type quries, then it
> > may be worth to change pgpool as you described. But what happens if
> > one of the quries results in changing database, then master DB and
> > secondary DB will not be inconsistent and switcing over those two
> > servers will return inconsistent results. How do yo prevent this?
> 
> 	Most likely by explanation in pgpool documentation.
> 
> 	In fact my master and slave servers are Slony's master and slave
> 
> 	servers. When an UPDATE query is sent to Slony slave server, the
> 
> 	server will return an error. The error will be propagated
> through 
> 	pgpool back to the application and it will be up to the
> application 
> 	to deal with the problem. Most of my queries are SELECTs and I
> have 
> 	already changed my application to deal with failures of a few
> UPDATEs 
> 	queries.

> 	The currently implemented master/slave mode is useful only for
> *load
> 	balancing* with Slony. I need a pgpool mode that will be useful
> for
> 	*failovers* with Slony, given that I am prepared to deal with 
> 	limitations above. 
> 
> 	Do you think the proposed pgpool modification will be useful to
> 	others?

Well, with master/slave mode, you don't need to think about the case
when UPDATE queries are sent to slave. Pgpool only sends UPDATE quries
to master in master/slave mode.
--
SRA OSS, Inc. Japan
Tatsuo Ishii

> > -----Original Message-----
> > From: Tatsuo Ishii [mailto:ishii at sraoss.co.jp]
> > Sent: Wednesday, October 12, 2005 8:07 PM
> > To: Constantine Filin
> > Cc: t-ishii at sra.co.jp
> > Subject: Re: More pgpool options
> > 
> > > Greetings Tatsuo
> > >
> > > This is actually not a bug, it is a feature request. I can go ahead
> and
> > > get the feature done on my own but I'd like my works to be
> accessible
> > > for others.
> > >
> > > First, the description of feature itself:
> > >
> > > I need a new pgpool mode where pgpool alternates between a master
> and
> > > slave servers, having one chosen as the current in
> > > pool_config.current_backend_host_name. If the current server goes
> down,
> > > pgpool switches to the other. If the other goes down, pgpool
> switches to
> > > the first and so on.
> > >
> > > Also I need another mode of pgpool where pgpool is configured to
> send
> > > the queries to master DB by default and if master is down, then the
> > > query should be sent to the slave. When queries are sent to the
> slave,
> > > pgpool shall keep monitoring the master server status and as soon as
> > > master is up again, pgpool will invisibly switch back to master
> server.
> > >
> > > Questions:
> > >
> > > 1. Is there anyway to achieve the effect of the modes above by
> combining
> > > the
> > >    current pgpool options?
> > 
> > No.
> > 
> > > 2. If the answer on the #1 is "no", then how do I go about
> submitting my
> > >
> > >    changes to pgpool source? In fact the first mode is already
> > > implemented
> > >    and I'd like to submit the changes.
> > >
> > > Please let me know
> > >
> > > Thanks
> > 
> > Well, if your queries are all read-only SELECT type quries, then it
> > may be worth to change pgpool as you described. But what happens if
> > one of the quries results in changing database, then master DB and
> > secondary DB will not be inconsistent and switcing over those two
> > servers will return inconsistent results. How do yo prevent this?
> > --
> > SRA OSS, Inc. Japan
> > Tatsuo Ishii
> 


More information about the Pgpool-general mailing list