Skip to content

Commit 1adb4a3

Browse files
author
kayform
committed
competable with v17
1 parent fb41a58 commit 1adb4a3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pg_store_plans.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,8 +1373,13 @@ pgsp_store(char *plan, queryid_t queryId,
13731373
e->counters.temp_blks_read += bufusage->temp_blks_read;
13741374
e->counters.temp_blks_written += bufusage->temp_blks_written;
13751375

1376+
#if PG_VERSION_NUM >= 170000 /* compatible with version 17 */
1377+
e->counters.blk_read_time += INSTR_TIME_GET_MILLISEC(bufusage->local_blk_read_time);
1378+
e->counters.blk_write_time += INSTR_TIME_GET_MILLISEC(bufusage->local_blk_write_time);
1379+
#else
13761380
e->counters.blk_read_time += INSTR_TIME_GET_MILLISEC(bufusage->blk_read_time);
13771381
e->counters.blk_write_time += INSTR_TIME_GET_MILLISEC(bufusage->blk_write_time);
1382+
#endif
13781383

13791384
#if PG_VERSION_NUM >= 150000
13801385
e->counters.temp_blk_read_time += INSTR_TIME_GET_MILLISEC(bufusage->temp_blk_read_time);

0 commit comments

Comments
 (0)