Search Postgresql Archives

Re: txid and current_timestamp

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

 



Jasen Betts <jasen@xxxxxxxxxx> writes:
> On 2012-06-26, Vlad Arkhipov <arhipov@xxxxxxxxxxxx> wrote:
>> Is it guaranteed that if txid2 > txid1 then current_timestamp in 
>> transaction 2 >= current_timestamp in transaction 1?

> no. 

To enlarge on that: current_timestamp is set at the moment of receipt
from the client of a transaction's first command.  XID is not set until
(and unless) the transaction does something that modifies the database.
The elapsed time between can be quite variable depending on what
commands the client issues.

Even if this weren't the case, I wouldn't recommend relying on such an
assumption, because of factors like clock skew between different
processors.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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