laurenz / oracle_fdw

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

Oracle_fdw installation passes but with warnings during "make" command #669

Closed damianosiak closed 7 months ago

damianosiak commented 7 months ago

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 the make 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:

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

PATH=/usr/pgsql-15/bin:$PATH:$HOME/bin
export PATH
export LD_LIBRARY_PATH=/usr/lib/oracle/19.19/client64/lib
export ORACLE_HOME=/usr/lib/oracle/19.19/client64

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:

/usr/bin/mkdir -p '/usr/pgsql-15/lib'
/usr/bin/mkdir -p '/usr/pgsql-15/share/extension'
/usr/bin/mkdir -p '/usr/pgsql-15/share/extension'
/usr/bin/mkdir -p '/usr/pgsql-15/doc/extension'
/usr/bin/install -c -m 755  oracle_fdw.so '/usr/pgsql-15/lib/oracle_fdw.so'
/usr/bin/install -c -m 644 .//oracle_fdw.control '/usr/pgsql-15/share/extension/'
/usr/bin/install -c -m 644 .//oracle_fdw--1.2.sql .//oracle_fdw--1.0--1.1.sql .//oracle_fdw--1.1--1.2.sql  '/usr/pgsql-15/share/extension/'
/usr/bin/install -c -m 644 .//README.oracle_fdw '/usr/pgsql-15/doc/extension/'

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+

                                                   List of foreign-data wrappers
    Name    |  Owner   |      Handler       |      Validator       | Access privileges | FDW options |         Description
------------+----------+--------------------+----------------------+-------------------+-------------+-----------------------------
 oracle_fdw | postgres | oracle_fdw_handler | oracle_fdw_validator |                   |             | Oracle foreign data wrapper
(1 row)

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

laurenz commented 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.

damianosiak commented 7 months ago

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 :)