aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistsplit.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2013-02-07 22:53:06 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2013-02-07 22:53:06 -0500
commit0e23588e9e30150c7461303b3796274bb31b046f (patch)
treeecf227b1e30a9547614e54f9f9a33f00532ba852 /src/backend/access/gist/gistsplit.c
parente9c4a6270f48fabc14d5520f9c7af17694d64920 (diff)
downloadpostgresql-0e23588e9e30150c7461303b3796274bb31b046f.tar.gz
postgresql-0e23588e9e30150c7461303b3796274bb31b046f.zip
Fix performance issue in EXPLAIN (ANALYZE, TIMING OFF).
Commit af7914c6627bcf0b0ca614e9ce95d3f8056602bf, which added the TIMING option to EXPLAIN, had an oversight: if the TIMING option is disabled then control in InstrStartNode() goes through an elog(DEBUG2) call, which typically does nothing but takes a noticeable amount of time to do it. Tweak the logic to avoid that. In HEAD, also change the elog(DEBUG2)'s in instrument.c to elog(ERROR). It's not very clear why they weren't like that to begin with, but this episode shows that not complaining more vociferously about misuse is likely to do little except allow bugs to remain hidden. While at it, adjust some code that was making possibly-dangerous assumptions about flag bits being in the rightmost byte of the instrument_options word. Problem reported by Pavel Stehule (via Tomas Vondra).
Diffstat (limited to 'src/backend/access/gist/gistsplit.c')
0 files changed, 0 insertions, 0 deletions