[Pgpool-general] pgpool-II documentation

Tatsuo Ishii ishii at sraoss.co.jp
Thu Apr 9 03:11:57 UTC 2009


> Sorry for sending lots of messages. When does the data get replicated?
> For example, if I perform a write (Insert operation), does it get
> copied over to all other nodes at the same moment?

"same moment" is impossible by relativity theory:-)

pgpool waits until all writes on nodes be finished. Note that readers
could, for example, read before node 2 is written but after node 1 is
written. If you want to let readers wait until all the nodes be
written, you could use table locking with writer but it will lead to
bad things as I already suggested.

I guess another related question is what is pgpool doing to maintain data consistency.

There are simple rules:

1) Always send queries to all the nodes if it's a write query

2) Detach a node if it fails.

3) Always execute queries in a transaction. If a node fails, the
   transaction aborts to rollback to previous data.
--
Tatsuo Ishii
SRA OSS, Inc. Japan

> Thanks,
> Harold
> 
> 
> --- On Wed, 4/8/09, Tatsuo Ishii <ishii at sraoss.co.jp> wrote:
> 
> > From: Tatsuo Ishii <ishii at sraoss.co.jp>
> > Subject: Re: [Pgpool-general] pgpool-II documentation
> > To: rold_50 at yahoo.com
> > Cc: pgpool-general at pgfoundry.org
> > Date: Wednesday, April 8, 2009, 9:03 PM
> > > Hi All,
> > > 
> > > Is there a more in-depth documentation of pgpool?
> > 
> > Before stepping into pgpool internal, it' s best to
> > understand how
> > PostgreSQL frontend/backend protocol works. See
> > "Frontend/Backend
> > Protocol".
> > 
> > > I'm mostly interested in how pgpool does the
> > replication process (how it ensures consistency, especially
> > under load_balance_mode).
> > 
> > There are some explanation in the pgpool-II docs(the latest
> > one
> > is:http://pgpool.projects.postgresql.org/pgpool-II/doc/pgpool-en.html).
> > 
> > 
> > Look into around:
> > http://pgpool.projects.postgresql.org/pgpool-II/doc/pgpool-en.html#config
> > -------------------------------------------------------------------
> > replicate_select
> > 
> >     When set to true, pgpool-II replicate SELECTs. If
> > false, pgpool-II
> >     only sends them to Master DB. Default is false.
> > -------------------------------------------------------------------
> > 
> > and:
> > 
> > http://pgpool.projects.postgresql.org/pgpool-II/doc/load_balance.png
> > 
> > Also I'm going to give a talk at PGCon 2009 in Ottawa.
> > I would like to
> > talk about how pgpool-II tries to keep the consistency
> > among databases.
> > --
> > Tatsuo Ishii
> > SRA OSS, Inc. Japan


More information about the Pgpool-general mailing list