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

Re: Another way to reduce pg_subtrans lookup overhead

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Another way to reduce pg_subtrans lookup overhead
Date: 2005-12-01 15:21:16
Message-ID: 10854.1133450476@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Tom Lane wrote:
>> I thought of a different approach to it, which is to make snapshot
>> checking take a hint from TransactionIdIsInProgress: use the subxid
>> caches from the PG_PROC array.

> Yeah, I had thought about using the XidCache while checking your other
> approach yesterday.  I was thinking however not in saving the Xids in
> the snapshot, but using the ones already in PGPROC.  Not sure if that is
> as useful, but looks like at least it would be able to reduce the
> probability of examining pg_subtrans in some cases without introducing
> extra cost.

How would that work?  The ones in PGPROC, by the time you are examining
the snapshot, might have little to do with the ones that were valid at
the time the snap was taken.  Another problem is that (AFAICS) you'd
have to lock the ProcArray to look at them, and the whole point of this
exercise is to avoid needing to lock shared data structures during
HeapTupleSatisfiesSnapshot.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Jonah H. HarrisDate: 2005-12-01 15:55:40
Subject: Re: generalizing the planner knobs
Previous:From: Tom LaneDate: 2005-12-01 15:07:31
Subject: Re: [PATCHES] A couple of proposed pgbench changes

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