Commit e416830
committed
Prevent auto_explain from changing the output of a user's EXPLAIN.
Commit af7914c, which introduced the
EXPLAIN (TIMING) option, for some reason coded explain.c to look at
planstate->instrument->need_timer rather than es->timing to decide
whether to print timing info. However, the former flag might get set
as a result of contrib/auto_explain wanting timing information. We
certainly don't want activation of auto_explain to change user-visible
statement behavior, so fix that.
Also fix an independent bug introduced in the same patch: in the code
path for a never-executed node with a machine-friendly output format,
if timing was selected, it would fail to print the Actual Rows and Actual
Loops items.
Per bug #10404 from Tomonari Katsumata. Back-patch to 9.2 where the
faulty code was introduced.1 parent a0841ec commit e416830
1 file changed
+16
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1184 | 1184 | | |
1185 | 1185 | | |
1186 | 1186 | | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
1187 | 1193 | | |
1188 | 1194 | | |
1189 | 1195 | | |
1190 | 1196 | | |
1191 | | - | |
| 1197 | + | |
| 1198 | + | |
1192 | 1199 | | |
1193 | 1200 | | |
1194 | 1201 | | |
| |||
1197 | 1204 | | |
1198 | 1205 | | |
1199 | 1206 | | |
1200 | | - | |
| 1207 | + | |
1201 | 1208 | | |
1202 | 1209 | | |
1203 | 1210 | | |
| |||
1208 | 1215 | | |
1209 | 1216 | | |
1210 | 1217 | | |
1211 | | - | |
| 1218 | + | |
1212 | 1219 | | |
1213 | 1220 | | |
1214 | 1221 | | |
| |||
1219 | 1226 | | |
1220 | 1227 | | |
1221 | 1228 | | |
1222 | | - | |
1223 | 1229 | | |
1224 | 1230 | | |
1225 | | - | |
1226 | | - | |
1227 | | - | |
1228 | | - | |
1229 | | - | |
1230 | 1231 | | |
1231 | 1232 | | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
1232 | 1238 | | |
1233 | 1239 | | |
1234 | 1240 | | |
1235 | | - | |
1236 | 1241 | | |
1237 | 1242 | | |
1238 | 1243 | | |
| |||
1426 | 1431 | | |
1427 | 1432 | | |
1428 | 1433 | | |
1429 | | - | |
| 1434 | + | |
1430 | 1435 | | |
1431 | 1436 | | |
1432 | 1437 | | |
| |||
0 commit comments