Re: "xmin" system column

Поиск
Список
Период
Сортировка
Искать
От
Eric B. Ridge
Тема
Re: "xmin" system column
Дата
Msg-id
5071266A-78E7-40DD-87EA-2419B10DA545@tcdi.com
Ответ на
Список
Дерево обсуждения
"xmin" system column "Eric B. Ridge" <ebr@tcdi.com>
Re: "xmin" system column Michael Fuhr <mike@fuhr.org>
Re: "xmin" system column "Eric B. Ridge" <ebr@tcdi.com>
Re: "xmin" system column Tom Lane <tgl@sss.pgh.pa.us>
Re: "xmin" system column "Eric B. Ridge" <ebr@tcdi.com>
Re: "xmin" system column Michael Fuhr <mike@fuhr.org>
Re: "xmin" system column Michael Fuhr <mike@fuhr.org>
Re: "xmin" system column "Eric B. Ridge" <ebr@tcdi.com>
Re: "xmin" system column Christian Kratzer <ck-lists@cksoft.de>
Re: "xmin" system column "Jim C. Nasby" <jnasby@pervasive.com>
Re: "xmin" system column Tom Lane <tgl@sss.pgh.pa.us>
Re: "xmin" system column Marko Kreen <markokr@gmail.com>
On Jan 26, 2006, at 4:44 PM, Tom Lane wrote:

> "Eric B. Ridge"  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
FAQ