Re: Recovery of Multi-stage WAL actions

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Recovery of Multi-stage WAL actions
Date: 2007-10-30 07:38:06
Message-ID: 1193729886.4260.106.camel@ebony.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 2007-10-30 at 00:48 -0400, Tom Lane wrote:
> Simon Riggs <simon(at)2ndquadrant(dot)com> writes:
> > What I'd like to do is force all of the RMs to record the lsn of any WAL
> > record that starts an incomplete action.
> > ...
> > I'd like to suggest that those changes be performed now for 8.3 *and*
> > back-patched for 8.2.
>
> There is zero chance of the former and less than zero of the latter;
> making major, hard-to-test changes in the rather-hypothetical hope
> of discovering entirely-hypothetical bugs is not my idea of the way
> to run a stable release branch.

I understand that initial thought.

Right now, the two bugs discovered seem likely to mean that anyone
running a combination of a 8.2, GIN index and Warm Standby has a bug
that will only show itself when the standby server comes out of standby.
At the very least we should add the DEBUG2 message I referred to earlier
into 8.2 and then release a new dot release immediately for 8.2 to allow
users to avoid this error.

The problem is then we have no way of knowing whether there is a 3rd bug
after that. I'm not happy about my suggestion and its possible effects
on stability. However, if I'm running Postgres HA, then I *need* to know
that there is no bug, not just presume there is not one. The latter
presumption is looking weak after two bugs. So adding logging code to
that area is important.

If you're still adamant, then I would suggest we modify the GIN xlog
code so it has a simple test for orphaned incomplete splits. I didn't
want to single out that particular code, but I think we should do
something for 8.2 and 8.3.

I'll look at a simplest-possible patch for that.

> Feel free to create a patch for 8.4 though --- I think this is a
> reasonable suggestion for making *future* RM development safer.
> (Also, if there are any bugs in the extant code, we'd presumably
> back-patch fixes discovered in 8.4 testing, long as you don't
> whack the code around to the point of unrecognizability...)

OK, will do.

--
Simon Riggs
2ndQuadrant http://www.2ndQuadrant.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message sayali k 2007-10-30 07:53:21 Multiple trees in parsetree_list
Previous Message Tom Lane 2007-10-30 04:59:23 Re: install-strip causes dyld errors on OS X