[Pgpool-general] can't attach two nodes simultaneously

Tatsuo Ishii ishii at sraoss.co.jp
Thu Apr 15 06:20:39 UTC 2010


> Am 15.04.2010 06:34, Tatsuo Ishii wrote:
> 
> >> 2. Is there a way to attach multiple nodes in an "atomic" way?
> > 
> > Why do you need atomicity for this?
> 
> Because only then it is guaranteed that the databases will be in sync.
> 
> Consider this:
> 
> 1. pgpool with 2 backends
> 2. 2 backends are detached for some reason (i.e. switch/cabling changes, pgpool sitting on a different host than the databases)
> 3. clients are trying to write to pgpool continuously
> 4. switch/cabling repaired
> 5. you do "pcp_attach_node ... 0" to attach node 0
> 6. there are some writes happening which go to node 0 only
> 7. yo do "pcp_attach_node ... 0" to attach node 1
> 8. writes go to both nodes now, but node 1 does not contain some data now
> 
> 
> There is a workaround: stop pgpool, remove its status file, start it again, but that's not really it.

Why don't you do online recovery for node 1 after 8? This will
guarantee node 0 and 1 are in sync.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


More information about the Pgpool-general mailing list