Re: Odd transaction timestamp sequence issue

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Odd transaction timestamp sequence issue
Дата
Msg-id 9979.1145632160@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Odd transaction timestamp sequence issue  (Jeff Amiel <jamiel@istreamimaging.com>)
Ответы Re: Odd transaction timestamp sequence issue  (Jeff Amiel <jamiel@istreamimaging.com>)
Список pgsql-general
Jeff Amiel <jamiel@istreamimaging.com> writes:
> For example, for id 210210 we have an audit trail that looks like this...

> audit_id    record_id        when                   column    old_val
> new_val
> --------    -----------    --------------           -------   -------
> -------
> 1            210210        2006-04-20 12:49:03.92   state     INITIAL
> COMPLETE
> 2            210210        2006-04-20 12:49:03.74   flag      X          Y

> By looking at the timestamps, the second update started BEFORE the first
> update even though the second update cannot occur if the state hasn't
> been changed and committed by the first one!

How is the "when" column determined?  You did not show it in your SQL
commands.

If it's being driven off now() or CURRENT_TIMESTAMP, then the above
isn't all that surprising, because the value is the time of transaction
start not the time at which the update was made.

            regards, tom lane

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

Предыдущее
От: Jeff Amiel
Дата:
Сообщение: Odd transaction timestamp sequence issue
Следующее
От: Teodor Sigaev
Дата:
Сообщение: Re: A few questions about ltree