Re: Repeatable read and serializable transactions see data committed after tx start

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Repeatable read and serializable transactions see data committed after tx start
Дата
Msg-id 12606.1415254372@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Repeatable read and serializable transactions see data committed after tx start  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Список pgsql-hackers
Jim Nasby <Jim.Nasby@BlueTreble.com> writes:
> Hmm... we do have transaction_timestamp(); perhaps we could leave that as the time BEGIN executed and shift
everythingelse to use the snapshot time.
 

It's not possible to take a timestamp that *exactly* matches the snapshot
time.   We could rearrange the code so that we ask the kernel for
timeofday just before or after capturing some relevant snapshot, but
there's still going to be some skew there.

In any case, I believe we document those timestamps as being the time of
arrival of a command from the client, not in terms of any snapshots.
To the extent that people use now() to represent the time of insertion of
data, I think the command arrival time is arguably the best definition.
Delaying it until the server code gets around to capturing a snapshot
would not be an improvement.
        regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Convert query plan to sql query
Следующее
От: Andres Freund
Дата:
Сообщение: Re: tracking commit timestamps