Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id BF9279FB6A7 for ; Mon, 23 Apr 2007 16:25:14 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 82609-08 for ; Mon, 23 Apr 2007 16:25:07 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from howe.textdrive.com (howe.textdrive.com [207.7.108.240]) by postgresql.org (Postfix) with ESMTP id A23569FB697 for ; Mon, 23 Apr 2007 16:25:09 -0300 (ADT) Received: from [10.0.23.134] (unknown [209.149.59.218]) by howe.textdrive.com (Postfix) with ESMTP id 293CC120D17 for ; Mon, 23 Apr 2007 19:25:05 +0000 (GMT) Resent-Message-Id: Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: multipart/alternative; boundary=Apple-Mail-24--666876688 Resent-Date: Mon, 23 Apr 2007 14:25:02 -0500 Message-Id: Resent-To: pgsql-admin@postgresql.org From: "Thomas F. O'Connell" Subject: Re: pg_standby, Restartable Recovery after Hard Failure Resent-From: "Thomas F. O'Connell" Date: Mon, 23 Apr 2007 13:31:57 -0500 To: pgsql-admin@postgresql.org X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.176 tagged_above=0 required=5 tests=AWL=-1.306, BAYES_40=-0.185, DCC_CHECK=2.17, HTML_40_50=0.496, HTML_MESSAGE=0.001 X-Spam-Level: * X-Archive-Number: 200704/210 X-Sequence-Number: 25274 --Apple-Mail-24--666876688 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed On Apr 23, 5:36 am, s...@2ndquadrant.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 --Apple-Mail-24--666876688 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1
On Apr 23, 5:36=A0am, = s...@2ndquadrant.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.
>
> --
> =A0 Simon Riggs =A0= =A0 =A0 =A0 =A0 =A0
> =A0 EnterpriseDB =A0http://www.enterprisedb.com
=

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


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.

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

615-260-000= 5= --Apple-Mail-24--666876688--