Re: [REVIEW] pg_last_xact_insert_timestamp

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [REVIEW] pg_last_xact_insert_timestamp
Дата
Msg-id 1459.1317591331@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [REVIEW] pg_last_xact_insert_timestamp  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> It occurs to me that pgstat_report_xact_end_timestamp doesn't really
> need to follow the protocol of bumping the change count before and
> after bumping the timestamp.  We elsewhere assume that four-byte reads
> and writes are atomic, so there's no harm in assuming the same thing
> here (and if they're not... then the change-count thing is pretty
> dubious anyway).  I think it's sufficient to just set the value, full
> stop.

I agree you can read the value without that, but I think that setting
it should still bump the change count.  Otherwise there's no way for
another process to collect the whole struct and be sure that it's
self-consistent.  We may not have a critical need for that right now,
but it's silly to foreclose the possibility to save a cycle or so.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_cancel_backend by non-superuser
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Should we get rid of custom_variable_classes altogether?