Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with PostgreSQL 16 #418

Closed
ImTheKai opened this issue Jul 26, 2023 · 6 comments
Closed

Compatibility with PostgreSQL 16 #418

ImTheKai opened this issue Jul 26, 2023 · 6 comments
Assignees

Comments

@ImTheKai
Copy link
Contributor

We need to ensure pg_stat_monitor is compatible and works with PostgreSQL 16 once it is released.

@devrimgunduz
Copy link

Hi,

v16 is due next week (rc1 was released last week). Latest release fails to build against v16 (see below) Can you please take a look?

Thanks!

Devrim

/usr/lib64/ccache/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I./ -I/usr/pgsql-16/include/server -I/usr/pgsql-16/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -flto=thin -emit-llvm -c -o hash_query.bc hash_query.c
/usr/lib64/ccache/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I./ -I/usr/pgsql-16/include/server -I/usr/pgsql-16/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -flto=thin -emit-llvm -c -o guc.bc guc.c
/usr/lib64/ccache/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2 -I. -I./ -I/usr/pgsql-16/include/server -I/usr/pgsql-16/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -flto=thin -emit-llvm -c -o pg_stat_monitor.bc pg_stat_monitor.c
pg_stat_monitor.c: In function '_PG_init':
pg_stat_monitor.c:339:33: warning: assignment to 'ExecutorCheckPerms_hook_type' {aka '_Bool (*)(List *, List , _Bool)'} from incompatible pointer type '_Bool ()(List *, _Bool)' [-Wincompatible-pointer-types]
339 | ExecutorCheckPerms_hook = HOOK(pgsm_ExecutorCheckPerms);
| ^
pg_stat_monitor.c: In function 'pgsm_ExecutorCheckPerms':
pg_stat_monitor.c:830:57: error: incompatible type for argument 2 of 'prev_ExecutorCheckPerms_hook'
830 | return prev_ExecutorCheckPerms_hook(rt, abort);
| ^~~~~
| |
| _Bool
pg_stat_monitor.c:830:57: note: expected 'List ' but argument is of type '_Bool'
pg_stat_monitor.c:830:24: error: too few arguments to function 'prev_ExecutorCheckPerms_hook'
830 | return prev_ExecutorCheckPerms_hook(rt, abort);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [: pg_stat_monitor.o] Error 1
make[1]: *** Waiting for unfinished jobs....
pg_stat_monitor.c:339:26: error: incompatible function pointer types assigning to 'ExecutorCheckPerms_hook_type' (aka 'bool (
)(struct List *, struct List *, bool)') from 'bool (List *, bool)' (aka 'bool (struct List *, bool)') [-Wincompatible-function-pointer-types]
ExecutorCheckPerms_hook = HOOK(pgsm_ExecutorCheckPerms);
^ ~~~~~~~~~~~~~~~~~~~~~~~
pg_stat_monitor.c:830:48: error: too few arguments to function call, expected 3, have 2
return prev_ExecutorCheckPerms_hook(rt, abort);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
2 errors generated.

@ImTheKai
Copy link
Contributor Author

ImTheKai commented Sep 8, 2023

We already have a PR waiting to be merged so, we are ready to release a new version with PG16 support. Can you check? #419

@ImTheKai
Copy link
Contributor Author

PR was merged and new version will be shipped shortly after PG16 release.

@devrimgunduz
Copy link

Can you please release the new version before v16? This will help both us (packagers) and users.

@hqakhtar
Copy link
Contributor

Release 2.0.2 created. Thank you Devrim for raising this issue.

@devrimgunduz
Copy link

@EngineeredVirus thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants