Lazy xid assignment V3 - Mailing list pgsql-patches

From Florian G. Pflug
Subject Lazy xid assignment V3
Date
Msg-id 46DB6EDB.80608@phlo.org
Whole thread Raw
Responses Re: Lazy xid assignment V3  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: Lazy xid assignment V3  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
List pgsql-patches
I tried sending this with the actual patch attached - this time,
to pgsql-pacthes, but it seems that my mail didn't get through again.
So it've put up the patch here: http://soc.phlo.org/lazyxidassign.v3.patch

----------------------------------------
Hi

Here is an updated version of my patch. This is pretty much equivalent
to the version V2, apart from the few minor things Tom criticized. The
changes are.

.) elog(ERROR) instead of Assert if there are to-be-deleted files, but
no XID assigned on commit

.) ResourceOwnerId is renamed to VirtualTransactionId.

.) GetOldestXmin() checks GetTopTransactionIdIfAny() first, and only
     reverts to ReadNewTransactionId() if the former returns
     InvalidTransactionId.

Since we didn't really reach an agreement on how xid_age should behave,
I've reverted it back to the original version. So with this patch,
xid_age will just force assignment of a xid. The other proposed ideas
where

.) Use some cached xid value which is kept stable for the duration of
     a transaction.
.) Use RecentGlobalXmin. This makes the notion of xid age consistent with
     VACCUM. The value could change between statements though (for
     read-committed transactions).
.) Use the current snaphot's xmax. This would be the closest possible
     approximation of using ReadNewTransasctionId() that keeps the xid age
     constant during a statement or transaction. (Depending on the xact being
     read-committed or serializable).

greetings, Florian Pflug



pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: WIP patch for per-function GUC settings
Next
From: "Heikki Linnakangas"
Date:
Subject: tsearch refactorings