Skip to content

Build error against PostgreSQL 13 #26

Closed
@devrimgunduz

Description

@devrimgunduz

Hi,

PostgreSQL 13 is out today, and this extension fails to build against it. Can you please take a look?

Thanks! Devrim

/usr/lib64/ccache/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -O2 -I. -I./ -I/usr/pgsql-13/include/server -I/usr/pgsql-13/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -flto=thin -emit-llvm -c -o compat.bc compat.c
pg_wait_sampling.c: In function '_PG_init':
pg_wait_sampling.c:314:17: warning: assignment to 'planner_hook_type' {aka 'PlannedStmt * (*)(Query *, const char *, int, struct ParamListInfoData )'} from incompatible pointer type 'PlannedStmt * ()(Query *, int, struct ParamListInfoData *)' [-Wincompatible-pointer-types]
314 | planner_hook = pgws_planner_hook;
| ^
pg_wait_sampling.c: In function 'pgws_planner_hook':
pg_wait_sampling.c:798:35: warning: passing argument 2 of 'planner_hook_next' makes pointer from integer without a cast [-Wint-conversion]
798 | return planner_hook_next(parse, cursorOptions, boundParams);
| ^~~~~~~~~~~~~
| |
| int
pg_wait_sampling.c:798:35: note: expected 'const char *' but argument is of type 'int'
pg_wait_sampling.c:798:50: warning: passing argument 3 of 'planner_hook_next' makes integer from pointer without a cast [-Wint-conversion]
798 | return planner_hook_next(parse, cursorOptions, boundParams);
| ^~~~~~~~~~~
| |
| ParamListInfo {aka struct ParamListInfoData *}
pg_wait_sampling.c:798:50: note: expected 'int' but argument is of type 'ParamListInfo' {aka 'struct ParamListInfoData *'}
pg_wait_sampling.c:798:10: error: too few arguments to function 'planner_hook_next'
798 | return planner_hook_next(parse, cursorOptions, boundParams);
| ^~~~~~~~~~~~~~~~~
pg_wait_sampling.c:800:33: warning: passing argument 2 of 'standard_planner' makes pointer from integer without a cast [-Wint-conversion]
800 | return standard_planner(parse, cursorOptions, boundParams);
| ^~~~~~~~~~~~~
| |
| int
In file included from pg_wait_sampling.c:17:
/usr/pgsql-13/include/server/optimizer/planner.h:41:64: note: expected 'const char *' but argument is of type 'int'
41 | extern PlannedStmt *standard_planner(Query *parse, const char *query_string,
| ~~~~~~~~~~~~^~~~~~~~~~~~
pg_wait_sampling.c:800:48: warning: passing argument 3 of 'standard_planner' makes integer from pointer without a cast [-Wint-conversion]
800 | return standard_planner(parse, cursorOptions, boundParams);
| ^~~~~~~~~~~
| |
| ParamListInfo {aka struct ParamListInfoData *}
In file included from pg_wait_sampling.c:17:
/usr/pgsql-13/include/server/optimizer/planner.h:42:15: note: expected 'int' but argument is of type 'ParamListInfo' {aka 'struct ParamListInfoData *'}
42 | int cursorOptions,
| ~~~~^~~~~~~~~~~~~
pg_wait_sampling.c:800:9: error: too few arguments to function 'standard_planner'
800 | return standard_planner(parse, cursorOptions, boundParams);
| ^~~~~~~~~~~~~~~~
In file included from pg_wait_sampling.c:17:
/usr/pgsql-13/include/server/optimizer/planner.h:41:21: note: declared here
41 | extern PlannedStmt *standard_planner(Query *parse, const char *query_string,
| ^~~~~~~~~~~~~~~~
pg_wait_sampling.c:801:1: warning: control reaches end of non-void function [-Wreturn-type]
801 | }
| ^
collector.c: In function 'make_profile_hash':
collector.c:286:18: error: 'tag_hash' undeclared (first use in this function)
286 | hash_ctl.hash = tag_hash;
| ^~~~~~~~
collector.c:286:18: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [: pg_wait_sampling.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [: collector.o] Error 1
collector.c:286:18: error: use of undeclared identifier 'tag_hash'
hash_ctl.hash = tag_hash;
^
1 error generated.
make[1]: *** [/usr/pgsql-13/lib/pgxs/src/makefiles/../../src/Makefile.global:1051: collector.bc] Error 1
pg_wait_sampling.c:314:17: warning: incompatible pointer types assigning to 'planner_hook_type' (aka 'struct PlannedStmt ()(struct Query *, const char *, int, struct ParamListInfoData *)') from 'PlannedStmt *(Query *, int, ParamListInfo)' (aka 'struct PlannedStmt *(struct Query *, int, struct ParamListInfoData *)') [-Wincompatible-pointer-types]
planner_hook = pgws_planner_hook;
^ ~~~~~~~~~~~~~~~~~
pg_wait_sampling.c:798:61: error: too few arguments to function call, expected 4, have 3
return planner_hook_next(parse, cursorOptions, boundParams);
~~~~~~~~~~~~~~~~~ ^
pg_wait_sampling.c:800:59: error: too few arguments to function call, expected 4, have 3
return standard_planner(parse, cursorOptions, boundParams);
~~~~~~~~~~~~~~~~ ^
/usr/pgsql-13/include/server/optimizer/planner.h:41:1: note: 'standard_planner' declared here
extern PlannedStmt *standard_planner(Query *parse, const char *query_string,
^
1 warning and 2 errors generated.

Activity

rjuju

rjuju commented on Oct 28, 2020

@rjuju
Contributor

Hi @devrimgunduz. This extension should be compatible with pg13 since #24 was merged. Is the problem that there's no release that includes the fix?

anayrat

anayrat commented on Oct 28, 2020

@anayrat
Collaborator

FYI, I opened a PR for debian packaging (#28)
I successfully ran regression tests on PG from 9.6 to 13.

devrimgunduz

devrimgunduz commented on Oct 28, 2020

@devrimgunduz
Author

Hi @rjuju , we need a release, yes.

Thanks!

ololobus

ololobus commented on Nov 11, 2020

@ololobus
Contributor

@anayrat, @devrimgunduz, everything seems to be working fine with PostgreSQL 13 now, so I've just tagged v1.1.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @devrimgunduz@ololobus@rjuju@anayrat

        Issue actions

          Build error against PostgreSQL 13 · Issue #26 · postgrespro/pg_wait_sampling