Search Postgresql Archives

Re: How to safely compare transaction id?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Marko Kreen wrote:
> On 1/11/08, alphax <alphax@xxxxxxxxxxx> 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"?



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux