Re: "xmin" system column

Поиск
Список
Период
Сортировка
От Eric B. Ridge
Тема Re: "xmin" system column
Дата
Msg-id 5071266A-78E7-40DD-87EA-2419B10DA545@tcdi.com
обсуждение исходный текст
Ответ на Re: "xmin" system column  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: "xmin" system column  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: "xmin" system column  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
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


В списке pgsql-general по дате отправления:

Предыдущее
От: Chris Browne
Дата:
Сообщение: Re: VACUUM Question
Следующее
От: "Eric B. Ridge"
Дата:
Сообщение: Re: "xmin" system column