[Pgpool-general] saving state across pgpool restarts?

Daniel.Crespo at l-3com.com Daniel.Crespo at l-3com.com
Thu Oct 29 17:21:07 UTC 2009


> > If pgpool-ii is restarted, it will consider that all backends are in
> "good"
> > state - even if one of the backends was not up to date (and data was
> not
> > being replicated there).
> >
> > What is the best way to preserve backend state across pgpool-ii
> restarts?
> 
> IMHO, making sure the PostgreSQL daemon is stopped when a failover is
> done on a node.

It seems that there is not a good solution for this.

For example, let's say I have two backends: backend0 and backend1.

1. Network connection error happens on backend0.
2. backend0 is denerated.
3. New data incomes into pgpool->backend1.
4. backend0 is now out of sync.
5. Network connection is re-established on backend0.
6. pgpool is restarted for some reason.
7. pgpool connects to both backends.
8. a client executes a query that causes to retrieve data from both
backends, but are mismatching.
9. pgpool degenerate the one that is NOT the master -> backend1.
10. DBA gets crazy because data was lost (in the backend1, when backend0
connection was down)

I think pgpool should keep track of which database has data with latest
timestamp in order to degenerate the oldest one. Is it possible?
Or any ideas as to how to solve or mitigate this?

Daniel


More information about the Pgpool-general mailing list