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

Re: Small Bug in GetConflictingVirtualXIDs

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Andres Freund <af(at)cybertec(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Subject: Re: Small Bug in GetConflictingVirtualXIDs
Date: 2010-01-14 11:27:42
Message-ID: 1263468462.26654.19743.camel@ebony (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Sun, 2009-12-27 at 20:11 +0100, Andres Freund wrote:
> On Tuesday 22 December 2009 11:42:30 Simon Riggs wrote:
> > On Tue, 2009-12-22 at 03:19 +0100, Andres Freund wrote:
> > > On Monday 21 December 2009 16:48:52 Simon Riggs wrote:
> > > > Giving the drop database a snapshot is not the answer. I expect Andres
> > > > to be able to fix this with a simple patch that would not effect the
> > > > case of normal running.
> > >
> > > Actually its less simply than I had thought at first - I don't think the
> > > code ever handled that correctly.
> > > I might be wrong there, my knowledge of the involved code is a bit
> > > sparse... The whole conflict resolution builds on the concept of waiting
> > > for an VXid, but an idle backend does not have a valid vxid. Thats
> > > correct, right?
> > I don't see any mileage in making Startup process wait for an idle
> > session, so no real reason to wait for others either.
> So here is a small patch implementing that behaviour.

On further testing, I received a re-connection from an automatic session
retry. That shouldn't have happened, but it indicates the need for
locking around the conflict handler. I had understood that to be placed
elsewhere but that seems wrong now.

This is a low priority item, so looking for a quick fix to allow time on
other areas.

Any objections?

 Simon Riggs 

Attachment: db_conflict_locking.patch
Description: text/x-patch (1.5 KB)

In response to

pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2010-01-14 12:14:44
Subject: Re: Streaming replication and non-blocking I/O
Previous:From: Dimitri FontaineDate: 2010-01-14 10:19:16
Subject: Re: segmentation fault in function

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