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

Re: Re: [COMMITTERS] pgsql: Reduce spurious Hot Standby conflicts from never-visible records

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Reduce spurious Hot Standby conflicts from never-visible records
Date: 2011-01-05 20:00:45
Message-ID: 1294257645.19612.14477.camel@ebony (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
On Mon, 2011-01-03 at 23:13 -0500, Robert Haas wrote:

> > Hmmm, my earlier code took xmax only if xmax > xmin. That was wrong;
> > what I have now is better, but your point is there may be an even better
> > truth. I'll think on that a little more.

I remember that I thought some more on this and decided that I couldn't
see a problem. I also see I didn't update the list to say that.

> I guess the problem case here is something like:
> 
> 1. T1 begins.  T1 writes a tuple A (so it gets an XID).
> 2. T2 begins.  T2 writes a tuple B (so it gets a later XID).
> 3. T1 takes a new snapshot that can see B and deletes B.
> 4. T2 commits.
> 5. T1 commits.

How is step (3) possible before step (4)?

There are later errors in your example also.

It's possible that that's all wrong because of how my head is feeling,
if so please explain long hand so I don't have to think too much.

-- 
 Simon Riggs           http://www.2ndQuadrant.com/books/
 PostgreSQL Development, 24x7 Support, Training and Services
 


In response to

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2011-01-05 20:06:31
Subject: Re: Re: [COMMITTERS] pgsql: Reduce spurious Hot Standby conflicts from never-visible records
Previous:From: A.M.Date: 2011-01-05 19:55:53
Subject: Re: making an unlogged table logged

pgsql-committers by date

Next:From: Robert HaasDate: 2011-01-05 20:06:31
Subject: Re: Re: [COMMITTERS] pgsql: Reduce spurious Hot Standby conflicts from never-visible records
Previous:From: Bruce MomjianDate: 2011-01-05 19:10:34
Subject: pgsql: Update pg_upgrade C comments.

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