ossc-db / pg_store_plans

Store execution plans like pg_stat_statements does for queries.
http://ossc-db.github.io/pg_store_plans/
Other
53 stars 26 forks source link

pg_store_plans.c fails to compile against PG 14.6 #29

Open BillSmith-EDB opened 1 year ago

BillSmith-EDB commented 1 year ago

Tags v1.6 & 1.6.1 work fine with v14 of PG. But when I try to build against the current head, it works against v15 but fails for v14. The error is:

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -fPIC -I. -I./ -I/usr/pgsql-14/include/server -I/usr/pgsql-14/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c -o pg_store_plans.o pg_store_plans.c In file included from /usr/pgsql-14/include/server/executor/instrument.h:16, from /usr/pgsql-14/include/server/nodes/execnodes.h:18, from /usr/pgsql-14/include/server/executor/execdesc.h:18, from /usr/pgsql-14/include/server/executor/executor.h:17, from /usr/pgsql-14/include/server/commands/explain.h:16, from pg_store_plans.c:41: pg_store_plans.c: In function ‘pgsp_store’: pg_store_plans.c:1359:70: error: ‘BufferUsage’ {aka ‘const struct BufferUsage’} has no member named ‘temp_blk_read_time’; did you mean ‘blk_read_time’? e->counters.temp_blk_read_time += INSTR_TIME_GET_MILLISEC(bufusage->temp_blk_read_time); ^~~~~~~~~~~~~~~~~~ /usr/pgsql-14/include/server/portability/instr_time.h:139:14: note: in definition of macro ‘INSTR_TIME_GET_MILLISEC’ (((double) (t).tv_sec * 1000.0) + ((double) (t).tv_nsec) / 1000000.0) ^ pg_store_plans.c:1359:70: error: ‘BufferUsage’ {aka ‘const struct BufferUsage’} has no member named ‘temp_blk_read_time’; did you mean ‘blk_read_time’? e->counters.temp_blk_read_time += INSTR_TIME_GET_MILLISEC(bufusage->temp_blk_read_time); ^~~~~~~~~~~~~~~~~~ /usr/pgsql-14/include/server/portability/instr_time.h:139:47: note: in definition of macro ‘INSTR_TIME_GET_MILLISEC’ (((double) (t).tv_sec * 1000.0) + ((double) (t).tv_nsec) / 1000000.0) ^ pg_store_plans.c:1360:71: error: ‘BufferUsage’ {aka ‘const struct BufferUsage’} has no member named ‘temp_blk_write_time’; did you mean ‘blk_write_time’? e->counters.temp_blk_write_time += INSTR_TIME_GET_MILLISEC(bufusage->temp_blk_write_time); ^~~~~~~~~~~~~~~~~~~ /usr/pgsql-14/include/server/portability/instr_time.h:139:14: note: in definition of macro ‘INSTR_TIME_GET_MILLISEC’ (((double) (t).tv_sec * 1000.0) + ((double) (t).tv_nsec) / 1000000.0) ^ pg_store_plans.c:1360:71: error: ‘BufferUsage’ {aka ‘const struct BufferUsage’} has no member named ‘temp_blk_write_time’; did you mean ‘blk_write_time’? e->counters.temp_blk_write_time += INSTR_TIME_GET_MILLISEC(bufusage->temp_blk_write_time); ^~~~~~~~~~~~~~~~~~~ /usr/pgsql-14/include/server/portability/instr_time.h:139:47: note: in definition of macro ‘INSTR_TIME_GET_MILLISEC’ (((double) (t).tv_sec * 1000.0) + ((double) (t).tv_nsec) / 1000000.0) ^ make: *** [<builtin>: pg_store_plans.o] Error 1 [runner@ab00969d1a3d pg_store_plans]$