Re: [PATCH] Lazy xid assingment V2

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>, "Postgresql-Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Lazy xid assingment V2
Date: 2007-09-01 00:46:01
Message-ID: 5208.1188607561@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> It seems both this and some of the other cases of having to call
> ReadNewTransactionId would be eliminated if we invented a new xid treated
> similarly to current_time() and others which are calculated once per
> transaction and then cached for subsequent accesses. So xid_age() would
> measure relative to a fixed xid, it just wouldn't be *our* xid necessarily.

Hm, so basically call ReadNewTransactionId the first time one of these
functions is used within a given transaction, and save that? Or we
could use our own transaction ID if one was already assigned at that
point. Seems reasonable. Not sure what to call the thing though.
ArbitraryReferenceXID?

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian G. Pflug 2007-09-01 01:24:28 Re: [PATCH] Lazy xid assingment V2
Previous Message Tom Lane 2007-09-01 00:32:10 Re: pgsql: Apply a band-aid fix for the problem that 8.2 and up completely