laurenz / oracle_fdw

PostgreSQL Foreign Data Wrapper for Oracle
http://laurenz.github.io/oracle_fdw/
Other
496 stars 156 forks source link

Issue with Installing on Postgres16.1 on same server as Postgres15.5 #639

Closed adam-shenker closed 10 months ago

adam-shenker commented 10 months ago

Hi,

I have previously installed this excellent package on Postgresql 14 and 15. I am trying to install it now on Postgres16 so that I can run pg_upgrade from version 15 to 16. Installing on Oracle Linux/Redhat 9.3

I created a new directory, copied the file oracle_fdw-ORACLE_FDW_2_5_0.tar there. Opened the tar. I shut down the Postgresql 15 database and opened up the postgres16 database I changed my path to : /usr/pgsql-16/bin:/usr/lib/oracle/19.19/client64/bin:/usr/lib/oracle/19.19/client64/lib:/usr/pgsql-16/bin:/usr/lib/oracle/19.19/client64/bin:/usr/lib/oracle/19.19/client64/lib:/usr/share/Modules/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin

I set the port (as it is different from normal) and tested this with psql.: export PGPORT=5433 [postgres@postgres-dev 16-oracle_fdw-ORACLE_FDW_2_5_0]$ psql psql (16.1)

I also have oracle client installed and can connect to a database using a tns entry.

My make command gives me the following error that I cannot find online anywhere:

[postgres@postgres-dev 16-oracle_fdw-ORACLE_FDW_2_5_0]$ make gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -fvisibility=hidden -I"/sdk/include" -I"/oci/include" -I"/rdbms/public" -I"/" -I/usr/include/oracle/19.19/client64 -I. -I./ -I/usr/pgsql-16/include/server -I/usr/pgsql-16/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c -o oracle_fdw.o oracle_fdw.c oracle_fdw.c: In function ‘oracleGetForeignRelSize’: oracle_fdw.c:782:57: error: ‘RangeTblEntry’ has no member named ‘checkAsUser’ 782 | fdwState = getFdwState(foreigntableid, NULL, rte->checkAsUser); | ^~ oracle_fdw.c: In function ‘oraclePlanForeignModify’: oracle_fdw.c:1546:61: error: ‘RangeTblEntry’ has no member named ‘checkAsUser’ 1546 | fdwState = getFdwState(rte->relid, NULL, rte->checkAsUser); | ^~ oracle_fdw.c:1585:46: error: ‘RangeTblEntry’ has no member named ‘updatedCols’ 1585 | tmpset = bms_copy(rte->updatedCols); | ^~ oracle_fdw.c:1590:39: warning: implicit declaration of function ‘bms_first_member’; did you mean ‘bms_is_member’? [-Wimplicit-function-declaration] 1590 | while ((col = bms_first_member(tmpset)) >= 0) | ^~~~ | bms_is_member oracle_fdw.c: In function ‘oracleBeginForeignInsert’: oracle_fdw.c:1867:65: error: ‘RangeTblEntry’ has no member named ‘checkAsUser’ 1867 | fdw_state = getFdwState(RelationGetRelid(rel), NULL, rte->checkAsUser); | ^~ make: *** [: oracle_fdw.o] Error 1

Do you have any idea what I can do to solve this issue?

With thanks in advance for your help,

Adam.

laurenz commented 10 months ago

You have to use version 2.6.0 (or the current development version) with PostgreSQL v16.

adam-shenker commented 10 months ago

With much thanks,

Adam.

adam-shenker commented 10 months ago

WIth thanks,

Adam

laurenz commented 10 months ago

You are welcome.