Is it guaranteed that if txid2 > txid1 then current_timestamp in transaction 2 >= current_timestamp in transaction 1?
On 2012-06-26, Vlad Arkhipov <arhipov@dc.baikal.ru> wrote: > Is it guaranteed that if txid2 > txid1 then current_timestamp in > transaction 2 >= current_timestamp in transaction 1? no. -- ⚂⚃ 100% natural
Jasen Betts <jasen@xnet.co.nz> writes:
> On 2012-06-26, Vlad Arkhipov <arhipov@dc.baikal.ru> 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
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера