On Jan 26, 2006, at 4:44 PM, Tom Lane wrote:
> "Eric B. Ridge" <ebr@tcdi.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