Re: [WIP PATCH] Lazily assign xids for toplevel Transactions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [WIP PATCH] Lazily assign xids for toplevel Transactions
Date
Msg-id 1230.1188229735@sss.pgh.pa.us
Whole thread Raw
In response to Re: [WIP PATCH] Lazily assign xids for toplevel Transactions  ("Florian G. Pflug" <fgp@phlo.org>)
Responses Re: [WIP PATCH] Lazily assign xids for toplevel Transactions  ("Florian G. Pflug" <fgp@phlo.org>)
List pgsql-hackers
"Florian G. Pflug" <fgp@phlo.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


pgsql-hackers by date:

Previous
From: "Trevor Talbot"
Date:
Subject: Re: [GENERAL] Undetected corruption of table files
Next
From: Gregory Stark
Date:
Subject: Re: Undetected corruption of table files