ossc-db / pg_store_plans

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

Postgres 14 #14

Closed idevloo closed 1 year ago

idevloo commented 3 years ago

Hi,

Any idea if this extension is compatible with PostgreSQL 14beta3 on x86_64-pc-linux-gnu

While running the make, I'm getting :

root@milespgdb2:/usr/pgsql-14/share/contrib/pg_store_plans # make gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -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 pg_store_plans.c: In function ‘_PG_init’: pg_store_plans.c:440:22: warning: assignment from incompatible pointer type [enabled by default] ProcessUtility_hook = pgsp_ProcessUtility; ^ pg_store_plans.c: In function ‘pgsp_ExecutorStart’: pg_store_plans.c:713:3: error: too few arguments to function ‘InstrAlloc’ queryDesc->totaltime = InstrAlloc(1, INSTRUMENT_ALL); ^ In file included from /usr/pgsql-14/include/server/nodes/execnodes.h:18:0, 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:40: /usr/pgsql-14/include/server/executor/instrument.h:100:25: note: declared here extern Instrumentation InstrAlloc(int n, int instrument_options, ^ pg_store_plans.c: In function ‘pgsp_ProcessUtility’: pg_store_plans.c:836:8: error: incompatible type for argument 4 of ‘prev_ProcessUtility’ dest, completionTag); ^ pg_store_plans.c:836:8: note: expected ‘ProcessUtilityContext’ but argument is of type ‘ParamListInfo’ pg_store_plans.c:836:8: warning: passing argument 5 of ‘prev_ProcessUtility’ from incompatible pointer type [enabled by default] pg_store_plans.c:836:8: note: expected ‘ParamListInfo’ but argument is of type ‘struct QueryEnvironment ’ pg_store_plans.c:836:8: warning: passing argument 6 of ‘prev_ProcessUtility’ from incompatible pointer type [enabled by default] pg_store_plans.c:836:8: note: expected ‘struct QueryEnvironment ’ but argument is of type ‘struct DestReceiver ’ pg_store_plans.c:836:8: warning: passing argument 7 of ‘prev_ProcessUtility’ from incompatible pointer type [enabled by default] pg_store_plans.c:836:8: note: expected ‘struct DestReceiver ’ but argument is of type ‘struct QueryCompletion ’ pg_store_plans.c:836:8: error: too few arguments to function ‘prev_ProcessUtility’ pg_store_plans.c:840:9: error: incompatible type for argument 4 of ‘standard_ProcessUtility’ dest, completionTag); ^ In file included from pg_store_plans.c:51:0: /usr/pgsql-14/include/server/tcop/utility.h:85:13: note: expected ‘ProcessUtilityContext’ but argument is of type ‘ParamListInfo’ extern void standard_ProcessUtility(PlannedStmt pstmt, const char queryString, ^ pg_store_plans.c:840:9: warning: passing argument 5 of ‘standard_ProcessUtility’ from incompatible pointer type [enabled by default] dest, completionTag); ^ In file included from pg_store_plans.c:51:0: /usr/pgsql-14/include/server/tcop/utility.h:85:13: note: expected ‘ParamListInfo’ but argument is of type ‘struct QueryEnvironment ’ extern void standard_ProcessUtility(PlannedStmt pstmt, const char queryString, ^ pg_store_plans.c:840:9: warning: passing argument 6 of ‘standard_ProcessUtility’ from incompatible pointer type [enabled by default] dest, completionTag); ^ In file included from pg_store_plans.c:51:0: /usr/pgsql-14/include/server/tcop/utility.h:85:13: note: expected ‘struct QueryEnvironment ’ but argument is of type ‘struct DestReceiver ’ extern void standard_ProcessUtility(PlannedStmt pstmt, const char queryString, ^ pg_store_plans.c:840:9: warning: passing argument 7 of ‘standard_ProcessUtility’ from incompatible pointer type [enabled by default] dest, completionTag); ^ In file included from pg_store_plans.c:51:0: /usr/pgsql-14/include/server/tcop/utility.h:85:13: note: expected ‘struct DestReceiver ’ but argument is of type ‘struct QueryCompletion ’ extern void standard_ProcessUtility(PlannedStmt pstmt, const char queryString, ^ pg_store_plans.c:840:9: error: too few arguments to function ‘standard_ProcessUtility’ dest, completionTag); ^ In file included from pg_store_plans.c:51:0: /usr/pgsql-14/include/server/tcop/utility.h:85:13: note: declared here extern void standard_ProcessUtility(PlannedStmt pstmt, const char *queryString, ^ pg_store_plans.c: In function ‘pg_store_plans’: pg_store_plans.c:1043:57: error: ‘DEFAULT_ROLE_READ_ALL_STATS’ undeclared (first use in this function) bool is_allowed_role = is_member_of_role(GetUserId(), DEFAULT_ROLE_READ_ALL_STATS); ^ pg_store_plans.c:1043:57: note: each undeclared identifier is reported only once for each function it appears in make: * [pg_store_plans.o] Error 1 root@milespgdb2:/usr/pgsql-14/share/contrib/pg_store_plans # make gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -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 pg_store_plans.c: In function ‘_PG_init’: pg_store_plans.c:440:22: warning: assignment from incompatible pointer type [enabled by default] ProcessUtility_hook = pgsp_ProcessUtility; ^ pg_store_plans.c: In function ‘pgsp_ExecutorStart’: pg_store_plans.c:713:3: error: too few arguments to function ‘InstrAlloc’ queryDesc->totaltime = InstrAlloc(1, INSTRUMENT_ALL); ^ In file included from /usr/pgsql-14/include/server/nodes/execnodes.h:18:0, 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:40: /usr/pgsql-14/include/server/executor/instrument.h:100:25: note: declared here extern Instrumentation InstrAlloc(int n, int instrument_options, ^ pg_store_plans.c: In function ‘pgsp_ProcessUtility’: pg_store_plans.c:836:8: error: incompatible type for argument 4 of ‘prev_ProcessUtility’ dest, completionTag); ^ pg_store_plans.c:836:8: note: expected ‘ProcessUtilityContext’ but argument is of type ‘ParamListInfo’ pg_store_plans.c:836:8: warning: passing argument 5 of ‘prev_ProcessUtility’ from incompatible pointer type [enabled by default] pg_store_plans.c:836:8: note: expected ‘ParamListInfo’ but argument is of type ‘struct QueryEnvironment ’ pg_store_plans.c:836:8: warning: passing argument 6 of ‘prev_ProcessUtility’ from incompatible pointer type [enabled by default] pg_store_plans.c:836:8: note: expected ‘struct QueryEnvironment ’ but argument is of type ‘struct DestReceiver ’ pg_store_plans.c:836:8: warning: passing argument 7 of ‘prev_ProcessUtility’ from incompatible pointer type [enabled by default] pg_store_plans.c:836:8: note: expected ‘struct DestReceiver ’ but argument is of type ‘struct QueryCompletion ’ pg_store_plans.c:836:8: error: too few arguments to function ‘prev_ProcessUtility’ pg_store_plans.c:840:9: error: incompatible type for argument 4 of ‘standard_ProcessUtility’ dest, completionTag); ^ In file included from pg_store_plans.c:51:0: /usr/pgsql-14/include/server/tcop/utility.h:85:13: note: expected ‘ProcessUtilityContext’ but argument is of type ‘ParamListInfo’ extern void standard_ProcessUtility(PlannedStmt pstmt, const char queryString, ^ pg_store_plans.c:840:9: warning: passing argument 5 of ‘standard_ProcessUtility’ from incompatible pointer type [enabled by default] dest, completionTag); ^ In file included from pg_store_plans.c:51:0: /usr/pgsql-14/include/server/tcop/utility.h:85:13: note: expected ‘ParamListInfo’ but argument is of type ‘struct QueryEnvironment ’ extern void standard_ProcessUtility(PlannedStmt pstmt, const char queryString, ^ pg_store_plans.c:840:9: warning: passing argument 6 of ‘standard_ProcessUtility’ from incompatible pointer type [enabled by default] dest, completionTag); ^ In file included from pg_store_plans.c:51:0: /usr/pgsql-14/include/server/tcop/utility.h:85:13: note: expected ‘struct QueryEnvironment ’ but argument is of type ‘struct DestReceiver ’ extern void standard_ProcessUtility(PlannedStmt pstmt, const char queryString, ^ pg_store_plans.c:840:9: warning: passing argument 7 of ‘standard_ProcessUtility’ from incompatible pointer type [enabled by default] dest, completionTag); ^ In file included from pg_store_plans.c:51:0: /usr/pgsql-14/include/server/tcop/utility.h:85:13: note: expected ‘struct DestReceiver ’ but argument is of type ‘struct QueryCompletion ’ extern void standard_ProcessUtility(PlannedStmt pstmt, const char queryString, ^ pg_store_plans.c:840:9: error: too few arguments to function ‘standard_ProcessUtility’ dest, completionTag); ^ In file included from pg_store_plans.c:51:0: /usr/pgsql-14/include/server/tcop/utility.h:85:13: note: declared here extern void standard_ProcessUtility(PlannedStmt pstmt, const char queryString, ^ pg_store_plans.c: In function ‘pg_store_plans’: pg_store_plans.c:1043:57: error: ‘DEFAULT_ROLE_READ_ALL_STATS’ undeclared (first use in this function) bool is_allowed_role = is_member_of_role(GetUserId(), DEFAULT_ROLE_READ_ALL_STATS); ^ pg_store_plans.c:1043:57: note: each undeclared identifier is reported only once for each function it appears in make: [pg_store_plans.o] Error 1

idevloo commented 2 years ago

Gentle reminder

yamatattsu commented 2 years ago

Hi idevloo,

Sorry for the late reply. We have started to revise pg_store_plans on PG14 from today. :-D

Regareds, Tatsuro Yamada

idevloo commented 2 years ago

Hi Tatsuro,

Any expected time of arrival ?

How are things progressing ?

Thanks, Ivan

yamatattsu commented 2 years ago

Hi Ivan,

Can you try this commit? https://github.com/ossc-db/pg_store_plans/commit/5121fd3d0c6a409db1da077f064dd38a0d26f359

Thanks, Tatsuro Yamada

idevloo commented 2 years ago

Hi,

I’ll try to install this commit to my postgresql version 14.

I’ll keep you informed

Thanks, Ivan

From: Tatsuro Yamada @.> Sent: Thursday, November 25, 2021 8:12 AM To: ossc-db/pg_store_plans @.> Cc: Ivan Devloo @.>; Author @.> Subject: Re: [ossc-db/pg_store_plans] Postgres 14 (#14)

Hi Ivan,

Can you try this commit? 5121fd3https://github.com/ossc-db/pg_store_plans/commit/5121fd3d0c6a409db1da077f064dd38a0d26f359

Thanks, Tatsuro Yamada

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ossc-db/pg_store_plans/issues/14#issuecomment-978896361, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJEDDJDQIDMCMU4FXUV7ZIDUNXOUNANCNFSM5DL4TQSQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

This e-mail is intended solely for the person(s) to whom it is addressed, and may contain information that is privileged, confidential, or otherwise protected from disclosure. Access to this email by anyone else is unauthorized. Dissemination, distribution, disclosure, or reproduction of this e-mail by anyone other than its intended recipient is prohibited and may be unlawful. Email transmission cannot be guaranteed to be secure or error free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Sofico does not accept any liability for losses resulting from infected email transmissions. Please note that any views expressed in this email may be those of the originator and do not constitute a representation that the content of this e-mail is intended to reflect those of Sofico or to be legally binding upon Sofico.

yamatattsu commented 2 years ago

Hi Ivan,

5121fd3

Sorry, there are wrong commits history on the master branch. I'll let you know when it was fixed.

Regards, Tatsuro Yamada

idevloo commented 2 years ago

ok

From: Tatsuro Yamada @.> Sent: Thursday, November 25, 2021 10:14 AM To: ossc-db/pg_store_plans @.> Cc: Ivan Devloo @.>; Author @.> Subject: Re: [ossc-db/pg_store_plans] Postgres 14 (#14)

Hi Ivan,

5121fd3https://github.com/ossc-db/pg_store_plans/commit/5121fd3d0c6a409db1da077f064dd38a0d26f359

Sorry, there are wrong commits history on the master branch. I'll let you know when it was fixed.

Regards, Tatsuro Yamada

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ossc-db/pg_store_plans/issues/14#issuecomment-978997855, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJEDDJBXT4WAH4ZL3FPC7FTUNX47BANCNFSM5DL4TQSQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

This e-mail is intended solely for the person(s) to whom it is addressed, and may contain information that is privileged, confidential, or otherwise protected from disclosure. Access to this email by anyone else is unauthorized. Dissemination, distribution, disclosure, or reproduction of this e-mail by anyone other than its intended recipient is prohibited and may be unlawful. Email transmission cannot be guaranteed to be secure or error free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Sofico does not accept any liability for losses resulting from infected email transmissions. Please note that any views expressed in this email may be those of the originator and do not constitute a representation that the content of this e-mail is intended to reflect those of Sofico or to be legally binding upon Sofico.

idevloo commented 2 years ago

Hi Tatsuro,

Can you please indicate what the status is now ?

Can I start some testing ?

Thanks Ivan

yamatattsu commented 2 years ago

Hi Ivan,

Sorry for the late reply. As you might know, pg_store_plans 1.6 was released two days ago.

https://github.com/ossc-db/pg_store_plans/releases/tag/1.6

Hope it helps.

Thanks, Tatsuro Yamada

BillSmith-EDB commented 1 year ago

@idevloo @yamatattsu I'm able to compile v1.6 & v1.6.1 against v14 of PG successfully. I think this issue can be closed. Thoughts?

yamatattsu commented 1 year ago

@BillSmith-EDB Yeah, agreed. I closed this issue as well as the issue below: https://github.com/ossc-db/pg_store_plans/issues/13