From: | "Eric B(dot) Ridge" <ebr(at)tcdi(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: "xmin" system column |
Date: | 2006-01-26 22:05:19 |
Message-ID: | 5071266A-78E7-40DD-87EA-2419B10DA545@tcdi.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Jan 26, 2006, at 4:44 PM, Tom Lane wrote:
> "Eric B. Ridge" <ebr(at)tcdi(dot)com> writes:
>> Outside of "VACUUM FREEZE", is there any way the "xmin" column in a
>> relation can change, assuming of course the tuple is never updated
>> again?
>
> If the tuple lives long enough, VACUUM will change it to
> FrozenTransactionId
> eventually, even without the FREEZE option.
That's what I was afraid of. I've pondering making a "grouping"
column that gets set to "xmin" via an UPDATE trigger. At least I'd
have a constant value that would survive database dumps and reloads.
> This seems OK as long as the transaction was fairly recent. Note that
> you will need a fairly restrictive definition of "same transaction"
> (no subtransactions).
I really need a way to create a unique identifier at the start of a
top-level transaction, and be able to use it via triggers and/or
column default values in that or its subtransactions.
Is there some kind of "TopXID" magic variable/function that I haven't
found in the documentation?
eric
From | Date | Subject | |
---|---|---|---|
Next Message | Eric B. Ridge | 2006-01-26 22:07:39 | Re: "xmin" system column |
Previous Message | Bob Pawley | 2006-01-26 21:59:03 | Re: Arrays |