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

Re: Phantom command ids again

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Phantom command ids again
Date: 2007-01-29 15:42:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Heikki Linnakangas <heikki(at)enterprisedb(dot)com> writes:
> I was about to resubmit the phantom command ids patch for review, as I 
> noticed a little problem.

> In fmgr.c in record_C_func, we cache the xmin and cmin, and later in 
> lookup_C_func we check that they match to determine if the cached 
> information is still valid. With phantom command ids, the cmin is not 
> valid outside the inserting transaction, which makes it unusable for 
> that purpose.

I think that actually that's just belt-and-suspenders programming;
it should be sufficient to compare tuple TID and xmin.  AFAICS a single
transaction cannot fill the same TID twice, since VACUUM would never
dare remove a tuple entered by a still-in-progress transaction.  So the
cmin check doesn't seem necessary.

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2007-01-29 15:53:42
Subject: Re: Phantom command ids again
Previous:From: Gregory StarkDate: 2007-01-29 13:38:02
Subject: Re: Recursive query syntax ambiguity

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