Re: [WIP PATCH] Lazily assign xids for toplevel Transactions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
Cc: Postgresql-Hackers <pgsql-hackers(at)postgresql(dot)org>, Simon Riggs <simon(at)2ndquadrant(dot)com>
Subject: Re: [WIP PATCH] Lazily assign xids for toplevel Transactions
Date: 2007-08-27 15:48:55
Message-ID: 1230.1188229735@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Florian G. Pflug" <fgp(at)phlo(dot)org> writes:
> Sounds good, if we decide to go with the transient XID idea. So below
> for an alternative that I just came up with.

This proposal appears to require taking and releasing a brand-new lock
type every time a snapshot is made or destroyed. That is certainly not
going to be less overhead than the transient-XID scheme. At least in
READ COMMITTED mode, there are normally multiple snapshots taken per
transaction.

(Something worth noting here is that I expect soon, probably 8.4,
we will fix things so that what a backend advertises in MyProc->xmin
is the xmin of its oldest still-live snapshot. That means that xmin
will change intra-transaction in READ COMMITTED mode, and thus that
we would indeed need to take and release the sort of lock you are
suggesting each time.)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2007-08-27 15:50:06 Re: Undetected corruption of table files
Previous Message Trevor Talbot 2007-08-27 15:48:19 Re: [HACKERS] Undetected corruption of table files