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

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

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Cc: Valentine Gogichashvili <valgog(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>
Subject: Re: BUG #6661: out-of-order XID insertion in KnownAssignedXids
Date: 2012-06-07 16:49:42
Message-ID: 201206071849.42655.andres@2ndquadrant.com (view raw or flat)
Thread:
Lists: pgsql-bugs
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

Attachment: 0001-Fix-a-bug-in-the-assembly-of-recovery-snapshots-in-H.patch
Description: text/x-patch (2.7 KB)

In response to

Responses

pgsql-bugs by date

Next:From: Kasper RönningDate: 2012-06-07 18:56:42
Subject: Re: Issue when displaying TIMESTAMPTZ values
Previous:From: Tom LaneDate: 2012-06-07 14:37:18
Subject: Re: Issue when displaying TIMESTAMPTZ values

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