pgsql: Fix inappropriate printing of never-measured times in EXPLAIN.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix inappropriate printing of never-measured times in EXPLAIN.
Date: 2016-08-12 16:13:23
Message-ID: E1bYF5H-0001oJ-RD@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix inappropriate printing of never-measured times in EXPLAIN.

EXPLAIN (ANALYZE, TIMING OFF) would print an elapsed time of zero for
a trigger function, because no measurement has been taken but it printed
the field anyway. This isn't what EXPLAIN does elsewhere, so suppress it.

In the same vein, EXPLAIN (ANALYZE, BUFFERS) with non-text output format
would print buffer I/O timing numbers even when no measurement has been
taken because track_io_timing is off. That seems not per policy, either,
so change it.

Back-patch to 9.2 where these features were introduced.

Maksim Milyutin

Discussion: <081c0540-ecaa-bd29-3fd2-6358f3b359a9(at)postgrespro(dot)ru>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/4b234fd8bf21cd6f5ff44f1f1c613bf40860998d

Modified Files
--------------
src/backend/commands/explain.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2016-08-12 22:45:32 pgsql: Doc: clarify that DROP ... CASCADE is recursive.
Previous Message Simon Riggs 2016-08-12 11:50:39 pgsql: Code cleanup in SyncRepWaitForLSN()