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

Re: pg_standby, Restartable Recovery after Hard Failure

From: "Thomas F(dot) O'Connell" <tf(at)o(dot)ptimized(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: pg_standby, Restartable Recovery after Hard Failure
Date: 2007-04-23 18:31:57
Message-ID: B91EB35C-FABB-43B7-8559-807C5EBEC9BE@o.ptimized.com (view raw or flat)
Thread:
Lists: pgsql-admin
On Apr 23, 5:36 am, s(dot)(dot)(dot)(at)2ndquadrant(dot)com ("Simon Riggs") wrote:
 > On Wed, 2007-04-18 at 18:11 -0500, Thomas F. O'Connell wrote:
 > > Wanting a nice test of restartable recovery and pg_standby in a  
warm
 > > standby server scenario I'm testing, today I pulled the plug on the
 > > box where I was using Simon's test_warm_standby test harness.
 > > Basically, in this scenario, I had one posgres cluster (primary)
 > > against which pgbench was being run and a separate cluster  
(standby)
 > > that had been created from a base backup and then put into  
continuous
 > > recovery using pg_standby. In the middle of this scenario, I  
literally
 > > pulled the plug.
 > > If anyone can shed light on what might've happened in the hard  
failure
 > > scenario, I'd be interested to know. I've kept the various archive,
 > > primary, and standby directories created by test_warm_standby, so I
 > > can report on any file contents.
 >
 > There is a possible error situation that I recently posted a fix  
to for
 > 8.3. If you use the -k option with a low value then pg_standby can
 > delete files from the archive too quickly, so that when it tries to
 > return to the last restartpoint the file for that is missing.
 >
 > The fix posted passes a new %r parameter to pg_standby, allowing  
it to
 > avoid deleting files too early.
 >
 > If that doesn't explain your situation please send me logfiles etc
 > off-list so I can examine the details some more. Thanks.
 >
 > > It occurs to me that timestamp information might be nice to have in
 > > pg_standby with debug mode. I might try patching pg_standby.c if no
 > > one beats me to it.
 >
 > I'll look at doing this.
 >
 > --
 >   Simon Riggs
 >   EnterpriseDB  http://www.enterprisedb.com

Simon,

I'm using revision 1.3 of pg_standby.c from here:

http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/pg_standby/ 
pg_standby.c

I don't see the %r parameter there. Is your patch not in HEAD yet, or  
is there somewhere else I should be looking?

I'm testing it as built against 8.2.3 and wasn't using -k during  
testing.

In later tests, we had some catastrophic data loss on disk, so I'm  
wondering if perhaps the hard failure created an anomalous scenario  
more related to Solaris and our disk subsystem than to pg_standby and  
continuous recovery.

--
Thomas F. O'Connell

optimizing modern web applications
: for search engines, for usability, and for performance :

http://o.ptimized.com/
615-260-0005

pgsql-admin by date

Next:From: Robert TreatDate: 2007-04-24 02:15:59
Subject: Re: Postgresql Help
Previous:From: Tom LaneDate: 2007-04-23 14:49:09
Subject: Re: pg_dump and pg_restore with different owners

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