Re: tracking commit timestamps

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: tracking commit timestamps
Дата
Msg-id 20141101173542.GS13584@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: tracking commit timestamps  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On 2014-11-01 13:45:44 +0900, Michael Paquier wrote:
> 14) I'd put the two checks in the reverse order:
> +       Assert(xid != InvalidTransactionId);
> +
> +       if (!commit_ts_enabled)
> +               return;

Please don't. The order is correct right now. Why you ask? This way the
correctness of the callsites is checked even when committs is
disabled. Which it'll likely be on the majority of developer setups. And
what's the upsite of changing the order? There's no difference in the
generated code in production builds and the overhead in assert enabled
ones is neglegible.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Pipelining executions to postgresql server
Следующее
От: Andres Freund
Дата:
Сообщение: Re: tracking commit timestamps