Re: How to safely compare transaction id?

Поиск
Список
Период
Сортировка
От alphax
Тема Re: How to safely compare transaction id?
Дата
Msg-id 47884AF9.5000407@vip.163.com
обсуждение исходный текст
Ответ на How to safely compare transaction id?  (alphax <alphax@vip.163.com>)
Ответы Re: How to safely compare transaction id?  ("Marko Kreen" <markokr@gmail.com>)
Re: How to safely compare transaction id?  ("Trevor Talbot" <quension@gmail.com>)
Список pgsql-general
Marko Kreen wrote:
> On 1/11/08, alphax <alphax@vip.163.com> wrote:
>> I want to compare the record's transaction id in sql statements or
>> PL/pgSQL stored procedure. Are there any system function or operator can
>> safely(transaction id wraparound safed) compare the transaction id?
>
> In 8.3 there are txid functions that export 8byte wraparound-safe
> transaction id, that can be safely stored in user tables:
>
> http://developer.postgresql.org/pgdocs/postgres/functions-info.html#FUNCTIONS-TXID-SNAPSHOT
>
>
> For 8.2 and below you can get them as external module from
> Skytools package: http://pgfoundry.org/projects/skytools
>

Thanks. Actually, I want to compares the system columns(xmin, xmax,
ctid) with the tid returned by txid functions declared in

http://developer.postgresql.org/pgdocs/postgres/functions-info.html#FUNCTIONS-TXID-SNAPSHOT


I want to determines a given record which visible to current transaction
whether or not be updated after some time point, that time point is
indicated by aother transaction id started and committed in past time.
How can I safely do that?

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"?



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: oddly slow query
Следующее
От: "henry"
Дата:
Сообщение: tcp_keepalives_idle ignored