Re: tracking commit timestamps

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Petr Jelinek <petr(at)2ndquadrant(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Jaime Casanova <jaime(at)2ndquadrant(dot)com>
Subject: Re: tracking commit timestamps
Date: 2014-11-01 17:35:42
Message-ID: 20141101173542.GS13584@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-www

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-11-01 17:44:42 Re: tracking commit timestamps
Previous Message Andres Freund 2014-11-01 17:31:16 Re: Pipelining executions to postgresql server

Browse pgsql-www by date

  From Date Subject
Next Message Andres Freund 2014-11-01 17:44:42 Re: tracking commit timestamps
Previous Message Petr Jelinek 2014-11-01 13:41:02 Re: tracking commit timestamps