@@ -353,7 +353,7 @@ standard_ExplainOneQuery(Query *query, int cursorOptions,
353353 /* plan the query */
354354 plan = pg_plan_query (query , queryString , cursorOptions , params , es );
355355
356- InstrStop (instr , true);
356+ instr = InstrStop (instr , true);
357357
358358 if (es -> memory )
359359 {
@@ -363,7 +363,7 @@ standard_ExplainOneQuery(Query *query, int cursorOptions,
363363
364364 /* run it (if needed) and produce output */
365365 ExplainOnePlan (plan , into , es , queryString , params , queryEnv ,
366- & instr -> total , (es -> buffers ? & instr -> stack -> bufusage : NULL ),
366+ & instr -> total , (es -> buffers ? & instr -> bufusage : NULL ),
367367 es -> memory ? & mem_counters : NULL );
368368}
369369
@@ -1827,7 +1827,7 @@ ExplainNode(PlanState *planstate, List *ancestors,
18271827 {
18281828 double nloops = planstate -> instrument -> nloops ;
18291829 double startup_ms = INSTR_TIME_GET_MILLISEC (planstate -> instrument -> startup ) / nloops ;
1830- double total_ms = INSTR_TIME_GET_MILLISEC (planstate -> instrument -> total ) / nloops ;
1830+ double total_ms = INSTR_TIME_GET_MILLISEC (planstate -> instrument -> instr . total ) / nloops ;
18311831 double rows = planstate -> instrument -> ntuples / nloops ;
18321832
18331833 if (es -> format == EXPLAIN_FORMAT_TEXT )
@@ -1893,7 +1893,7 @@ ExplainNode(PlanState *planstate, List *ancestors,
18931893 if (nloops <= 0 )
18941894 continue ;
18951895 startup_ms = INSTR_TIME_GET_MILLISEC (instrument -> startup ) / nloops ;
1896- total_ms = INSTR_TIME_GET_MILLISEC (instrument -> total ) / nloops ;
1896+ total_ms = INSTR_TIME_GET_MILLISEC (instrument -> instr . total ) / nloops ;
18971897 rows = instrument -> ntuples / nloops ;
18981898
18991899 ExplainOpenWorker (n , es );
@@ -2283,9 +2283,9 @@ ExplainNode(PlanState *planstate, List *ancestors,
22832283
22842284 /* Show buffer/WAL usage */
22852285 if (es -> buffers && planstate -> instrument )
2286- show_buffer_usage (es , & planstate -> instrument -> stack .bufusage , NULL );
2286+ show_buffer_usage (es , & planstate -> instrument -> instr .bufusage , NULL );
22872287 if (es -> wal && planstate -> instrument )
2288- show_wal_usage (es , & planstate -> instrument -> stack .walusage );
2288+ show_wal_usage (es , & planstate -> instrument -> instr .walusage );
22892289
22902290 /* Prepare per-worker buffer/WAL usage */
22912291 if (es -> workers_state && (es -> buffers || es -> wal ) && es -> verbose )
@@ -2302,9 +2302,9 @@ ExplainNode(PlanState *planstate, List *ancestors,
23022302
23032303 ExplainOpenWorker (n , es );
23042304 if (es -> buffers )
2305- show_buffer_usage (es , & instrument -> stack .bufusage , NULL );
2305+ show_buffer_usage (es , & instrument -> instr .bufusage , NULL );
23062306 if (es -> wal )
2307- show_wal_usage (es , & instrument -> stack .walusage );
2307+ show_wal_usage (es , & instrument -> instr .walusage );
23082308 ExplainCloseWorker (n , es );
23092309 }
23102310 }
0 commit comments