Closed damianosiak closed 7 months ago
I see no warnings in your question. The gcc
lines are just the output of make
and are the compiler invocations. Warnings would have the word "warning" in them. If you don't see any such warnings, there are none.
If there are any warnings, please let me know the exact message text.
Ah, my bad...
I misinterpreted the gcc
output and thought it was warnings (due to the large amount of text).
I'm glad to hear that the oracle_fdw installation went completely correctly.
Thanks for clarifying me and sorry for the confusion... So, we can consider this issue closed :)
Hi,
I'm encountering some warning messages when running the
make
command on the exported oracle_fdw. However, these warnings don't seem to affect the installation itself, as themake install
command completes successfully.I'm able to create the oracle_fdw extension in PostgreSQL and import a table from the Oracle database.
Should I be concerned about these warnings, or can I safely ignore them?
Warnings:
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 -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 -I"/usr/lib/oracle/19.19/client64/sdk/include" -I"/usr/lib/oracle/19.19/client64/oci/include" -I"/usr/lib/oracle/19.19/client64/rdbms/public" -I"/usr/lib/oracle/19.19/client64/" -I/usr/include/oracle/19.19/client64 -I. -I./ -I/usr/pgsql-15/include/server -I/usr/pgsql-15/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c -o oracle_fdw.o oracle_fdw.c
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 -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 -I"/usr/lib/oracle/19.19/client64/sdk/include" -I"/usr/lib/oracle/19.19/client64/oci/include" -I"/usr/lib/oracle/19.19/client64/rdbms/public" -I"/usr/lib/oracle/19.19/client64/" -I/usr/include/oracle/19.19/client64 -I. -I./ -I/usr/pgsql-15/include/server -I/usr/pgsql-15/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c -o oracle_utils.o oracle_utils.c
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 -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 -I"/usr/lib/oracle/19.19/client64/sdk/include" -I"/usr/lib/oracle/19.19/client64/oci/include" -I"/usr/lib/oracle/19.19/client64/rdbms/public" -I"/usr/lib/oracle/19.19/client64/" -I/usr/include/oracle/19.19/client64 -I. -I./ -I/usr/pgsql-15/include/server -I/usr/pgsql-15/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c -o oracle_gis.o oracle_gis.c
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 -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 -shared -o oracle_fdw.so oracle_fdw.o oracle_utils.o oracle_gis.o -L/usr/pgsql-15/lib -Wl,--as-needed -L/usr/lib64 -L/usr/lib64 -Wl,--as-needed -Wl,-rpath,'/usr/pgsql-15/lib',--enable-new-dtags -L"/usr/lib/oracle/19.19/client64/" -L"/usr/lib/oracle/19.19/client64/bin" -L"/usr/lib/oracle/19.19/client64/lib" -L"/usr/lib/oracle/19.19/client64/lib/amd64" -L/usr/lib/oracle/19.19/client64/lib -lclntsh
Here's my lab environment setup:
Steps to reproduce:
1. Rocky Linux 9.3 clean installation (server) and yum update
2. PostgreSQL 15.6 installation: 2.1. exclude the search for postgresql packages from the Rocky repository:
vi /etc/yum.repos.d/rocky.repo
exclude=postgresql*
2.2. install a repository configuration package using the official PostgreSQL repository:
yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm
2.3. install the PostgreSQL server:
yum install postgresql15-server
2.4. create a new PostgreSQL database cluster:
/usr/pgsql-15/bin/postgresql-15-setup initdb
2.5. start and enable PostgreSQL:
systemctl start postgresql-15
systemctl enable postgresql-15
3. Oracle_fdw installation:
3.1. download the Oracle Instant Client - base and devel:
wget https://download.oracle.com/otn_software/linux/instantclient/1919000/oracle-instantclient19.19-basic-19.19.0.0.0-1.el9.x86_64.rpm
wget https://download.oracle.com/otn_software/linux/instantclient/1919000/oracle-instantclient19.19-devel-19.19.0.0.0-1.el9.x86_64.rpm
3.2. install the Oracle Instant Client:
yum localinstall oracle-instantclient19.19-basic-19.19.0.0.0-1.el9.x86_64.rpm oracle-instantclient19.19-devel-19.19.0.0.0-1.el9.x86_64.rpm
3.3. add the environment variables to .bash_profile (root and postgres): (check path to pgsql using
find / -name "pg_config"
)vi .bash_profile
3.4. reopen ssh session and confirm that environment variables are correct:
pg_config --pgxs
3.5. download the oracle_fdw:
cd /tmp
wget https://github.com/laurenz/oracle_fdw/archive/refs/tags/ORACLE_FDW_2_6_0.zip
3.6. install the postgresql15-devel:
yum install postgresql15-devel
if error, then:
yum install epel-release
dnf config-manager --enable crb
yum install perl
yum install perl-IPC-Run
and try again:
yum install postgresql15-devel
3.7. extract the oracle_fdw:
cd /tmp
unzip ORACLE_FDW_2_6_0.zip
3.8. do "
make
" inside extracted oracle_fdw directory:cd oracle_fdw-ORACLE_FDW_2_6_0
make install
!!! HERE I GET THE WARNINGS MENTIONED EARLIER !!!3.9. and do "
make install
"make install
IS PERFORMED CORRECTLY:3.10. create oracle_fdw extension in PostgreSQL database:
psql -U postgres
SQL> create extension oracle_fdw;
3.11. confirm that extension is created:
SQL> \dew+
3.12. create foreign server, user mapping and import table from Oracle Database:
SQL> create server oracle_server foreign data wrapper oracle_fdw options (dbserver '//192.168.21.130:1521/TESTDB.srv1.com' );
SQL> create user mapping for postgres server oracle_server options (user 'testuser', password 'testuserpassword');
SQL> grant usage on foreign server oracle_server to postgres;
SQL> import foreign schema "TESTUSER" from server oracle_server into public;
3.13. confirm that table is imported:
SQL> \det+
SQL> select * from testtable;
. As I mentioned earlier, despite a few warnings, I am still able to create the oracle_fdw extension in PostgreSQL and import a table from the Oracle database. Is it worth bothering with them (warnings)?
Thanks in advance for your assistance. Best regards