Re: How to safely compare transaction id?

Поиск
Список
Период
Сортировка
Искать
От
alphax
Тема
Re: How to safely compare transaction id?
Дата
Msg-id
4789F1CC.1060906@vip.163.com
Ответ на
Список
Дерево обсуждения
Re: How to safely compare transaction id? alphax <alphax@vip.163.com>
Re: How to safely compare transaction id? "Trevor Talbot" <quension@gmail.com>
Re: How to safely compare transaction id? "Marko Kreen" <markokr@gmail.com>
Re: How to safely compare transaction id? alphax <alphax@vip.163.com>
Re: How to safely compare transaction id? Tom Lane <tgl@sss.pgh.pa.us>
Re: How to safely compare transaction id? alphax <alphax@vip.163.com>
Marko Kreen wroted:
>> By the way, Can I think that the value of system column "ctid" of an
>> record is the logical "current version" of that record, and used to
>> compare with txid returned by "FUNCTIONS-TXID-SNAPSHOT"?
>>     
>
> No, it is just physical location of the row.  
Thanks, I just done some simple tested,
//////////////////////////////////////////////////////////////////////////
// initialize
//////////////////////////////////////////////////////////////////////
create table test (last_update_tx_id);
insert into test(txid_current());



/////////////////////////////////////////////////////////////////////
// Every time I do an update, I found the last_update_tx_id is equal to 
the xmin
////////////////////////
begin
update test set last_update_tx_id = txid_current();
commit;

select *, test.xmin from test;
//////////////////////////////////////////////////////////////////////////

So, it seems the system column "cmin" is the logical "current version" 
of that record, isn't it?

В списке pgsql-general по дате отправления
От: Martijn van Oosterhout
Дата:
От: Michael Meskes
Дата:
Сообщение: Re: ECPG problem with 8.3
FAQ