ossc-db / pg_hint_plan

Extension adding support for optimizer hints in PostgreSQL
Other
710 stars 103 forks source link

Installation of pg_hint_plan failed for Enterprise DB 14.x #169

Closed somnathkhamaru closed 9 months ago

somnathkhamaru commented 10 months ago

Installation of pg_hint_plan failed Environment

Operating System: RHEL 8.8 PostgreSQL version:(EnterpriseDB) 14.1.0 pg_hint_plan version: REL14_1_4_2

PATH env variable [tester@iotvm39 pg_hint_plan-REL14_1_4_2]$ echo $PATH /home/tester/.local/bin:/home/tester/bin:/usr/share/Modules/bin:/usr/edb/as14/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin

When I execute the make command in the pg_hint_plan-REL14_1_4_2 directory, the following error appears:

[tester@iotvm39 pg_hint_plan-REL14_1_4_2]$ make

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -We rror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wca st-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precisi on=standard -Wno-format-truncation -Wno-stringop-truncation -I/usr/libexec/edb-i cu66/include/ -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-sw itches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat /redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-cla sh-protection -fcf-protection -I/usr/include/et -fPIC -I. -I./ -I/usr/edb/as14/i nclude/server -I/usr/edb/as14/include/internal -I/usr/libexec/edb-icu66/include/ -I/usr/include/et -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c -o p g_hint_plan.o pg_hint_plan.c pg_hint_plan.c:194:14: error: nested redefinition of ‘enum HintType’ typedef enum HintType ^~~~ pg_hint_plan.c:194:14: error: redeclaration of ‘enum HintType’ In file included from /usr/edb/as14/include/server/utils/guc.h:17, from /usr/edb/as14/include/server/access/tableam.h:23, from /usr/edb/as14/include/server/access/heapam.h:23, from pg_hint_plan.c:14: /usr/edb/as14/include/server/nodes/parsenodes.h:1774:14: note: originally define d here typedef enum HintType ^~~~ pg_hint_plan.c:1754:1: error: conflicting types for ‘parse_hints’ parse_hints(HintState hstate, Query parse, const char str) ^~~ In file included from /usr/edb/as14/include/server/optimizer/pathnode.h:18, from pg_hint_plan.c:29: /usr/edb/as14/include/server/optimizer/hints.h:69:17: note: previous declaration of ‘parse_hints’ was here extern List parse_hints(char source); ^~~ In file included from pg_hint_plan.c:5003: core.c: In function ‘create_plain_partial_paths’: core.c:556:21: error: too few arguments to function ‘compute_parallel_worker’ parallel_workers = compute_parallel_worker(rel, rel->pages, -1, ^~~~~~~ In file included from pg_hint_plan.c:30: /usr/edb/as14/include/server/optimizer/paths.h:59:12: note: declared here extern int compute_parallel_worker(RelOptInfo rel, double heap_pages, ^~~~~~~ make: *** [: pg_hint_plan.o] Error 1

jakubwartakEDB commented 9 months ago

The pg_plan_hint is not supported nor works by default with EPAS (PG fork). You might have two choices:

somnathkhamaru commented 9 months ago

Thanks for the reply . Is there any plan if future to support pghintplan for EDB ?

jakubwartakEDB commented 9 months ago

Hi, I cannot answer as the decision is made up by product management individually on each case (so please submit support case).

michaelpq commented 9 months ago

As far as I know, this comes down to EDB, while the module is able to compile and works with upstream Postgres. I am closing this ticket.