Re: BUG #6661: out-of-order XID insertion in KnownAssignedXids

From: Valentine Gogichashvili <valgog(at)gmail(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org, Simon Riggs <simon(at)2ndquadrant(dot)com>
Subject: Re: BUG #6661: out-of-order XID insertion in KnownAssignedXids
Date: 2012-06-08 10:25:25
Message-ID: CAP93muVVdeMZf2zP2-dJ6pZy0bUKffgXaSf5FuuUKj4q1S8PcA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Andres,

unfortunately I did not manage to keep the snapshot of the database, that
had this issue.

Can that be, that this issue only happens when the recovering from the WAL
files and not over the steaming replication?
On other standbys, having no WAL delay, we did not see this problem yet.

What I can do, is to switch streaming replication on one of the machines
off, and wait :(

Would it be possible to somehow generate a workload, that would lead to
this a problem?

With best regards,

-- Valentine Gogichashvili

On Thu, Jun 7, 2012 at 6:49 PM, Andres Freund <andres(at)2ndquadrant(dot)com>wrote:

> On Thursday, June 07, 2012 03:58:24 PM Andres Freund wrote:
> > Hi,
> >
> > On Thursday, June 07, 2012 12:44:08 PM Valentine Gogichashvili wrote:
> > > I have the situation again, one of 3 slaves was slow to play all the
> WAL
> > > files and being about 10GB late it crashed with the same error again.
> > >
> > > I collected DEBUG4 output in this time:
> > > https://docs.google.com/open?id=0B2NMMrfiBQcLZjNDbU0xQ3lvWms
> >
> > Ok, I stared at this some time and I think I see what the problem is.
> Some
> > log excerpts that lead my reasoning:
> > ...
> > after that we start adding all currently running xids from the snapshot
> to
> > the KnownAssigned machinery. They are already recorded though, so we fail
> > in KnownAssignedXidsAdd with the OPs error.
> >
> > The simplest fix for that seems to be to simply reset the
> KnownAssignedXids
> > state in the above branch. Any arguments against that?
> A patch implementing that is attached. Unfortunately not really tested yet
> because its kinda hard to hit that code-path.
>
> Valentine, can you test that patch?
>
> Andres
> --
> Andres Freund http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training & Services
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2012-06-08 10:42:00 Re: BUG #6661: out-of-order XID insertion in KnownAssignedXids
Previous Message Simon Riggs 2012-06-08 10:19:09 Re: BUG #6661: out-of-order XID insertion in KnownAssignedXids