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

pg_pathman-1.5.12 error on make (PostgreSQL 15.2 on Debian 11) #262

Open
MakPol opened this issue Feb 12, 2023 · 1 comment
Open

pg_pathman-1.5.12 error on make (PostgreSQL 15.2 on Debian 11) #262

MakPol opened this issue Feb 12, 2023 · 1 comment

Comments

@MakPol
Copy link

MakPol commented Feb 12, 2023

Problem description

Is it possible to build pg_pathman on PostgreSQL 15.2 without creating a custom build PostgreSQL?
"PostgreSQL with core-patch: 14, 15" in https://github.com/postgrespro/pg_pathman/blob/master/README.md - self-assembled PostgreSQL with a patch?

If I use http://apt.postgresql.org/pub/repos/apt/pool/main/p/postgresql-15 / - is it really possible to get pg_pathman to work?

When i run make install USE_PGXS=1

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 -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -I/root/pg_pathman-1.5.12/src/include -I. -I./ -I/usr/include/postgresql/15/server -I/usr/include/postgresql/internal  -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2   -c -o src/init.o src/init.c
src/init.c: In function ‘read_opexpr_const’:
src/init.c:931:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
  931 |     right = (Node *) constant;
      |     ~~~~~~^~~~~~~~~~~~~~~~~~~
src/init.c:935:3: note: here
  935 |   case T_Const:
      |   ^~~~
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 -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -I/root/pg_pathman-1.5.12/src/include -I. -I./ -I/usr/include/postgresql/15/server -I/usr/include/postgresql/internal  -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2   -c -o src/relation_info.o src/relation_info.c
src/relation_info.c: In function ‘parse_partitioning_expression’:
src/relation_info.c:1447:20: error: too few arguments to function ‘raw_parser’
 1447 |   parsetree_list = raw_parser(query_string);
      |                    ^~~~~~~~~~
In file included from src/relation_info.c:38:
/usr/include/postgresql/15/server/parser/parser.h:62:14: note: declared here
   62 | extern List *raw_parser(const char *str, RawParseMode mode);
      |              ^~~~~~~~~~
In file included from src/relation_info.c:11:
src/relation_info.c: In function ‘cook_partitioning_expression’:
/root/pg_pathman-1.5.12/src/include/compat/pg_compat.h:638:3: warning: implicit declaration of function ‘pg_analyze_and_rewrite’; did you mean ‘pg_analyze_and_rewrite_withcb’? [-Wimplicit-function-declaration]
  638 |   pg_analyze_and_rewrite((RawStmt *) (parsetree), (query_string), \
      |   ^~~~~~~~~~~~~~~~~~~~~~
src/relation_info.c:1530:21: note: in expansion of macro ‘pg_analyze_and_rewrite_compat’
 1530 |   query_tree_list = pg_analyze_and_rewrite_compat(parse_tree, query_string,
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/relation_info.c:1530:19: warning: assignment to ‘List *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 1530 |   query_tree_list = pg_analyze_and_rewrite_compat(parse_tree, query_string,
      |                   ^
src/relation_info.c:1558:29: warning: passing argument 1 of ‘pull_varnos’ from incompatible pointer type [-Wincompatible-pointer-types]
 1558 |   expr_varnos = pull_varnos(expr);
      |                             ^~~~
      |                             |
      |                             Node *
In file included from src/relation_info.c:32:
/usr/include/postgresql/15/server/optimizer/optimizer.h:192:44: note: expected ‘PlannerInfo *’ but argument is of type ‘Node *’
  192 | extern Bitmapset *pull_varnos(PlannerInfo *root, Node *node);
      |                               ~~~~~~~~~~~~~^~~~
src/relation_info.c:1558:17: error: too few arguments to function ‘pull_varnos’
 1558 |   expr_varnos = pull_varnos(expr);
      |                 ^~~~~~~~~~~
In file included from src/relation_info.c:32:
/usr/include/postgresql/15/server/optimizer/optimizer.h:192:19: note: declared here
  192 | extern Bitmapset *pull_varnos(PlannerInfo *root, Node *node);
      |                   ^~~~~~~~~~~
In file included from src/relation_info.c:11:
src/relation_info.c: In function ‘canonicalize_partitioning_expression’:
/root/pg_pathman-1.5.12/src/include/compat/pg_compat.h:620:3: warning: implicit declaration of function ‘parse_analyze’; did you mean ‘parse_sub_analyze’? [-Wimplicit-function-declaration]
  620 |   parse_analyze((RawStmt *) (parse_tree), (query_string), (param_types), \
      |   ^~~~~~~~~~~~~
src/relation_info.c:1661:10: note: in expansion of macro ‘parse_analyze_compat’
 1661 |  query = parse_analyze_compat(parse_tree, query_string, NULL, 0, NULL);
      |          ^~~~~~~~~~~~~~~~~~~~
src/relation_info.c:1661:8: warning: assignment to ‘Query *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 1661 |  query = parse_analyze_compat(parse_tree, query_string, NULL, 0, NULL);
      |        ^
make: *** [<встроенное>: src/relation_info.o] Ошибка 1

Environment

pg_pathman-1.5.12 (https://github.com/postgrespro/pg_pathman/archive/refs/tags/1.5.12.tar.gz)
PostgreSQL 15.2 (https://www.postgresql.org/download/linux/debian/)
Debian 11 (https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-11.6.0-amd64-netinst.iso)

Thank you so much for understanding!

@zhiyi98
Copy link

zhiyi98 commented Jul 13, 2024

I have encountered this problem, too. How can I solve it?

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

2 participants