Skip site navigation (1) Skip section navigation (2)

data loss with pg_standby when doing a controlled failover

From: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
To: pgsql-bugs(at)postgresql(dot)org
Subject: data loss with pg_standby when doing a controlled failover
Date: 2009-04-06 11:37:42
Message-ID: 49D9E986.8010604@pse-consulting.de (view raw or flat)
Thread:
Lists: pgsql-bugs
Running 8.3.7, I have a warm standby configuration with a
archive_timeout of 10min.

It's obvious that there's a 10min period where data could be lost if the
master fails and the warm standby server has to take over. What's not
obvious is that this is true even if the master server is shut down
regularly, because it will not write out a last log segment to the
archive. As a consequence, when doing a controlled failover (for
maintenance purposes or so) all data changed after the last archive copy
will be lost.
IMHO this should be mentioned in the docs explicitly (I find it quite
surprising that data can be lost even if the system is shutdown
correctly), or better when shutting down the postmaster should spit all
log segments containing all changes when archiving is on so the warm
standby server can catch up.

Regards.
Andreas

Responses

pgsql-bugs by date

Next:From: Scott MeadDate: 2009-04-06 13:42:15
Subject: Re: data loss with pg_standby when doing a controlled failover
Previous:From: Heikki LinnakangasDate: 2009-04-06 10:36:02
Subject: Re: length() return wrong result

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group