[Pgpool-general] Online recovery with sequence

Tatsuo Ishii ishii at sraoss.co.jp
Mon Aug 17 13:25:28 UTC 2009


> > In local pgpool mailing list in Japan, a user found that sequence
> > values among servers are out of sync after online recovery. This is
> > caused by the way how PostgreSQL logs sequence: it logs 32 on WAL
> > *before* PostgreSQL uses all of 32 sequence values. So after recovery,
> > recovered node's sequence advances about 32 than the one of the online
> > node. To handle the problem, I recommend to place following code in
> > your second stage recovery script.
> 
> If no sequences (SERIAL types and such) are used, I take it that we
> would not need this "patch", would we?

No. You are correct (the script does nothing if you have no sequences,
however).

> Because one error I got after
> upgrading to 2.2.3 was queries returning different number of rows in
> the two nodes (second node had just been recovered), and it's the
> error I am still trying to reproduce before I report it. Perhaps it
> has (or had) to do with this stuff...
--
Tatsuo Ishii
SRA OSS, Inc. Japan


More information about the Pgpool-general mailing list