Quantcast

error installing oracle_fdw extension

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

error installing oracle_fdw extension

Sumeet Shukla
Hi,

I'm seeeing below error while installing oracle_fdw 

-bash-4.1$ cd /opt/postgresql/9.6/share/postgresql/extension/oracle_fdw-1.1.0
-bash-4.1$ export PATH=/opt/postgresql/9.6/bin:$PATH
-bash-4.1$ export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/db_1
-bash-4.1$ export LD_LIBRARY_PATH=/u01/app/oracle/product/12.1.0.2/db_1/lib:/lib:/usr/lib
-bash-4.1$ make
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -fpic -I/u01/app/oracle/product/12.1.0.2/db_1/sdk/include -I/u01/app/oracle/product/12.1.0.2/db_1/oci/include -I/u01/app/oracle/product/12.1.0.2/db_1/rdbms/public -I/usr/include/oracle/12.1/client -I/usr/include/oracle/12.1/client64 -I/usr/include/oracle/11.2/client -I/usr/include/oracle/11.2/client64 -I/usr/include/oracle/11.1/client -I/usr/include/oracle/11.1/client64 -I/usr/include/oracle/10.2.0.5/client -I/usr/include/oracle/10.2.0.5/client64 -I/usr/include/oracle/10.2.0.4/client -I/usr/include/oracle/10.2.0.4/client64 -I/usr/include/oracle/10.2.0.3/client -I/usr/include/oracle/10.2.0.3/client64 -I. -I./ -I/opt/postgresql/9.6/include/postgresql/server -I/opt/postgresql/9.6/include/postgresql/internal -D_GNU_SOURCE  -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include  -c -o oracle_fdw.o oracle_fdw.c
oracle_fdw.c: In function ‘oracle_fdw_handler’:
oracle_fdw.c:269: warning: assignment from incompatible pointer type
oracle_fdw.c: In function ‘oracle_diag’:
oracle_fdw.c:441: error: too few arguments to function ‘GetConfigOptionByName’
oracle_fdw.c: In function ‘oracleGetForeignRelSize’:
oracle_fdw.c:751: error: ‘RelOptInfo’ has no member named ‘width’
oracle_fdw.c: In function ‘oracleGetForeignPaths’:
oracle_fdw.c:800: error: incompatible type for argument 3 of ‘create_foreignscan_path’
/opt/postgresql/9.6/include/postgresql/server/optimizer/pathnode.h:90: note: expected ‘struct PathTarget *’ but argument is of type ‘double’
oracle_fdw.c:800: error: incompatible type for argument 6 of ‘create_foreignscan_path’
/opt/postgresql/9.6/include/postgresql/server/optimizer/pathnode.h:90: note: expected ‘Cost’ but argument is of type ‘struct List *’
oracle_fdw.c:800: warning: passing argument 8 of ‘create_foreignscan_path’ from incompatible pointer type
/opt/postgresql/9.6/include/postgresql/server/optimizer/pathnode.h:90: note: expected ‘Relids’ but argument is of type ‘struct List *’
oracle_fdw.c:800: error: too few arguments to function ‘create_foreignscan_path’
oracle_fdw.c: In function ‘oracleGetForeignPlan’:
oracle_fdw.c:839: error: too few arguments to function ‘make_foreignscan’
oracle_fdw.c: In function ‘oraclePlanForeignModify’:
oracle_fdw.c:1226: error: ‘RangeTblEntry’ has no member named ‘modifiedCols’
oracle_fdw.c: In function ‘createQuery’:
oracle_fdw.c:1964: error: ‘RelOptInfo’ has no member named ‘reltargetlist’
oracle_fdw.c: In function ‘getOracleWhereClause’:
oracle_fdw.c:2609: error: too few arguments to function ‘array_create_iterator’
oracle_fdw.c: In function ‘transactionCallback’:
oracle_fdw.c:4262: warning: enumeration value ‘XACT_EVENT_PARALLEL_COMMIT’ not handled in switch
oracle_fdw.c:4262: warning: enumeration value ‘XACT_EVENT_PARALLEL_ABORT’ not handled in switch
oracle_fdw.c:4262: warning: enumeration value ‘XACT_EVENT_PARALLEL_PRE_COMMIT’ not handled in switch
make: *** [oracle_fdw.o] Error 1


Can someone help me with this.

Thanks & Regards,
Sumeet Shukla
Ph. No. 962 323 4700
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error installing oracle_fdw extension

Tom Lane-2
Sumeet Shukla <[hidden email]> writes:
> I'm seeeing below error while installing oracle_fdw

Looks like the version of oracle_fdw you're trying to install has
not been updated for PG 9.6.  You need to ask its developers
whether there's a newer version.

                        regards, tom lane


--
Sent via pgsql-admin mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error installing oracle_fdw extension

Peter Eisentraut-6
On 5/19/17 10:41, Tom Lane wrote:
> Sumeet Shukla <[hidden email]> writes:
>> I'm seeeing below error while installing oracle_fdw
>
> Looks like the version of oracle_fdw you're trying to install has
> not been updated for PG 9.6.  You need to ask its developers
> whether there's a newer version.

Yes, there are newer versions that support 9.6 and 10.

--
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


--
Sent via pgsql-admin mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error installing oracle_fdw extension

Sumeet Shukla
Thanks Tom and Peter. I tried installing the latest version oracle_fdw-1.5.0 and now I see below error:

-bash-4.1$ make
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -fpic -I/u01/app/oracle/product/12.1.0.2/db_1/sdk/include -I/u01/app/oracle/product/12.1.0.2/db_1/oci/include -I/u01/app/oracle/product/12.1.0.2/db_1/rdbms/public -I/usr/include/oracle/12.1/client -I/usr/include/oracle/12.1/client64 -I/usr/include/oracle/11.2/client -I/usr/include/oracle/11.2/client64 -I/usr/include/oracle/11.1/client -I/usr/include/oracle/11.1/client64 -I/usr/include/oracle/10.2.0.5/client -I/usr/include/oracle/10.2.0.5/client64 -I/usr/include/oracle/10.2.0.4/client -I/usr/include/oracle/10.2.0.4/client64 -I/usr/include/oracle/10.2.0.3/client -I/usr/include/oracle/10.2.0.3/client64 -I. -I./ -I/opt/postgresql/9.6/include/postgresql/server -I/opt/postgresql/9.6/include/postgresql/internal -D_GNU_SOURCE  -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include  -c -o oracle_utils.o oracle_utils.c
oracle_utils.c:22:17: error: oci.h: No such file or directory
oracle_utils.c:35: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘err_code’
oracle_utils.c:48: error: expected specifier-qualifier-list before ‘dvoid’
oracle_utils.c:69: error: expected declaration specifiers or ‘...’ before ‘dvoid’
oracle_utils.c:69: error: expected declaration specifiers or ‘...’ before ‘sb4’
oracle_utils.c:69: error: expected declaration specifiers or ‘...’ before ‘ub2’
oracle_utils.c:69: error: expected declaration specifiers or ‘...’ before ‘ub2’
oracle_utils.c:69: error: expected declaration specifiers or ‘...’ before ‘sb2’
oracle_utils.c:70: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘checkerr’
oracle_utils.c:72: error: expected ‘)’ before ‘*’ token 


Thanks & Regards,
Sumeet Shukla


On Sat, May 20, 2017 at 12:23 AM, Peter Eisentraut <[hidden email]> wrote:
On 5/19/17 10:41, Tom Lane wrote:
> Sumeet Shukla <[hidden email]> writes:
>> I'm seeeing below error while installing oracle_fdw
>
> Looks like the version of oracle_fdw you're trying to install has
> not been updated for PG 9.6.  You need to ask its developers
> whether there's a newer version.

Yes, there are newer versions that support 9.6 and 10.

--
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error installing oracle_fdw extension

Julien Rouhaud-2
Adding Laurenz

On 22/05/2017 07:56, Sumeet Shukla wrote:

> Thanks Tom and Peter. I tried installing the latest version
> oracle_fdw-1.5.0 and now I see below error:
>
> -bash-4.1$ make
> gcc -Wall -Wmissing-prototypes -Wpointer-arith
> -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute
> -Wformat-security -fno-strict-aliasing -fwrapv -g -O2
> -DMAP_HUGETLB=0x40000 -fpic
> -I/u01/app/oracle/product/12.1.0.2/db_1/sdk/include
> <http://12.1.0.2/db_1/sdk/include>
> -I/u01/app/oracle/product/12.1.0.2/db_1/oci/include
> <http://12.1.0.2/db_1/oci/include>
> -I/u01/app/oracle/product/12.1.0.2/db_1/rdbms/public
> <http://12.1.0.2/db_1/rdbms/public> -I/usr/include/oracle/12.1/client
> -I/usr/include/oracle/12.1/client64 -I/usr/include/oracle/11.2/client
> -I/usr/include/oracle/11.2/client64 -I/usr/include/oracle/11.1/client
> -I/usr/include/oracle/11.1/client64
> -I/usr/include/oracle/10.2.0.5/client <http://10.2.0.5/client>
> -I/usr/include/oracle/10.2.0.5/client64 <http://10.2.0.5/client64>
> -I/usr/include/oracle/10.2.0.4/client <http://10.2.0.4/client>
> -I/usr/include/oracle/10.2.0.4/client64 <http://10.2.0.4/client64>
> -I/usr/include/oracle/10.2.0.3/client <http://10.2.0.3/client>
> -I/usr/include/oracle/10.2.0.3/client64 <http://10.2.0.3/client64> -I.
> -I./ -I/opt/postgresql/9.6/include/postgresql/server
> -I/opt/postgresql/9.6/include/postgresql/internal -D_GNU_SOURCE
>  -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include  -c
> -o oracle_utils.o oracle_utils.c
> oracle_utils.c:22:17: error: oci.h: No such file or directory
Did you also install Oracle SDK files in the directory pointed by
$ORACLE_HOME?

--
Julien Rouhaud
http://dalibo.com - http://dalibo.org


--
Sent via pgsql-admin mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error installing oracle_fdw extension

Sumeet Shukla
Hi,

I have below environment variables set:

export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib:$LD_LIBRARY_PATH
export ORACLE_HOME=/usr/lib/oracle/12.1/client64
PATH=$PATH:/usr/lib/oracle/12.1/client64/bin:/usr/lib/oracle/12.1/client64/lib:/usr/lib/oracle/12.1/client64:/usr/lib/oracle/12.1/client64/sdk
export PATH

The file /opt/postgresql/9.6/lib/postgresql/oracle_fdw.so is available. 

I have also added "include /usr/lib/oracle/12.1/client64/lib" in /etc/ld.so.conf 

I still see below error when I perform "create extension oracle_fdw;"

ERROR: could not load library "/opt/postgresql/9.6/lib/postgresql/oracle_fdw.so": libclntsh.so.12.1: cannot open shared object file: No such file or directory



Thanks & Regards,
Sumeet Shukla


On Mon, May 22, 2017 at 12:00 PM, Julien Rouhaud <[hidden email]> wrote:
Adding Laurenz

On 22/05/2017 07:56, Sumeet Shukla wrote:
> Thanks Tom and Peter. I tried installing the latest version
> oracle_fdw-1.5.0 and now I see below error:
>
> -bash-4.1$ make
> gcc -Wall -Wmissing-prototypes -Wpointer-arith
> -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute
> -Wformat-security -fno-strict-aliasing -fwrapv -g -O2
> -DMAP_HUGETLB=0x40000 -fpic
> -I/u01/app/oracle/product/12.1.0.2/db_1/sdk/include
> <http://12.1.0.2/db_1/sdk/include>
> -I/u01/app/oracle/product/12.1.0.2/db_1/oci/include
> <http://12.1.0.2/db_1/oci/include>
> -I/u01/app/oracle/product/12.1.0.2/db_1/rdbms/public
> <http://12.1.0.2/db_1/rdbms/public> -I/usr/include/oracle/12.1/client
> -I/usr/include/oracle/12.1/client64 -I/usr/include/oracle/11.2/client
> -I/usr/include/oracle/11.2/client64 -I/usr/include/oracle/11.1/client
> -I/usr/include/oracle/11.1/client64
> -I/usr/include/oracle/10.2.0.5/client <http://10.2.0.5/client>
> -I/usr/include/oracle/10.2.0.5/client64 <http://10.2.0.5/client64>
> -I/usr/include/oracle/10.2.0.4/client <http://10.2.0.4/client>
> -I/usr/include/oracle/10.2.0.4/client64 <http://10.2.0.4/client64>
> -I/usr/include/oracle/10.2.0.3/client <http://10.2.0.3/client>
> -I/usr/include/oracle/10.2.0.3/client64 <http://10.2.0.3/client64> -I.
> -I./ -I/opt/postgresql/9.6/include/postgresql/server
> -I/opt/postgresql/9.6/include/postgresql/internal -D_GNU_SOURCE
>  -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include  -c
> -o oracle_utils.o oracle_utils.c
> oracle_utils.c:22:17: error: oci.h: No such file or directory
Did you also install Oracle SDK files in the directory pointed by
$ORACLE_HOME?

--
Julien Rouhaud
http://dalibo.com - http://dalibo.org

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error installing oracle_fdw extension

Albe Laurenz *EXTERN*
Sumeet Shukla wrote:

> I have below environment variables set:
>
>
> export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib:$LD_LIBRARY_PATH
> export ORACLE_HOME=/usr/lib/oracle/12.1/client64
> PATH=$PATH:/usr/lib/oracle/12.1/client64/bin:/usr/lib/oracle/12.1/client64/lib:/usr/lib/or
> acle/12.1/client64:/usr/lib/oracle/12.1/client64/sdk
> export PATH
>
> The file /opt/postgresql/9.6/lib/postgresql/oracle_fdw.so is available.
>
> I have also added "include /usr/lib/oracle/12.1/client64/lib" in /etc/ld.so.conf
>
> I still see below error when I perform "create extension oracle_fdw;"
>
>
> ERROR: could not load library "/opt/postgresql/9.6/lib/postgresql/oracle_fdw.so":
> libclntsh.so.12.1: cannot open shared object file: No such file or directory

Two possibilities:

- There is no libclntsh.so.12.1 in /usr/lib/oracle/12.1/client64/lib
- The environment variable LD_LIBRARY_PATH is not set in the postmaster's environment.

For the latter (assuming you are using Linux), find out the process ID of the
PostgreSQL server process (postmaster).

Assuming it is 12345, run this:
$ cat /proc/1234/environ | xargs -n 1 -0 echo

And see if LD_LIBRARY_PATH is set correctly there.

Yours,
Laurenz Albe

--
Sent via pgsql-admin mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error installing oracle_fdw extension

Sumeet Shukla
Yes, postmaster does not seem to be aware of  LD_LIBRARY_PATH. I tried ldconfig and postgres service restart but it does not seem to work. How can I fix this.

Also the owner of  /usr/lib/oracle/12.1/client64/lib/libclntsh.so.12.1 is root. Please confirm if it is OK.

Thanks & Regards,
Sumeet Shukla
Ph. No. 962 323 4700

On Mon, May 22, 2017 at 2:24 PM, Albe Laurenz <[hidden email]> wrote:
Sumeet Shukla wrote:
> I have below environment variables set:
>
>
> export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib:$LD_LIBRARY_PATH
> export ORACLE_HOME=/usr/lib/oracle/12.1/client64
> PATH=$PATH:/usr/lib/oracle/12.1/client64/bin:/usr/lib/oracle/12.1/client64/lib:/usr/lib/or
> acle/12.1/client64:/usr/lib/oracle/12.1/client64/sdk
> export PATH
>
> The file /opt/postgresql/9.6/lib/postgresql/oracle_fdw.so is available.
>
> I have also added "include /usr/lib/oracle/12.1/client64/lib" in /etc/ld.so.conf
>
> I still see below error when I perform "create extension oracle_fdw;"
>
>
> ERROR: could not load library "/opt/postgresql/9.6/lib/postgresql/oracle_fdw.so":
> libclntsh.so.12.1: cannot open shared object file: No such file or directory

Two possibilities:

- There is no libclntsh.so.12.1 in /usr/lib/oracle/12.1/client64/lib
- The environment variable LD_LIBRARY_PATH is not set in the postmaster's environment.

For the latter (assuming you are using Linux), find out the process ID of the
PostgreSQL server process (postmaster).

Assuming it is 12345, run this:
$ cat /proc/1234/environ | xargs -n 1 -0 echo

And see if LD_LIBRARY_PATH is set correctly there.

Yours,
Laurenz Albe

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error installing oracle_fdw extension

Albe Laurenz *EXTERN*
Sumeet Shukla wrote:
> Yes, postmaster does not seem to be aware of  LD_LIBRARY_PATH. I tried ldconfig and
> postgres service restart but it does not seem to work. How can I fix this.

You first have to add a line to /etc/ld.so.conf that reads
/usr/lib/oracle/12.1/client64/lib

Then run "ldconfig".

> Also the owner of  /usr/lib/oracle/12.1/client64/lib/libclntsh.so.12.1 is root. Please
> confirm if it is OK.

Yes, as long as the PostgreSQL user has permission to read the file.

Yours,
Laurenz Albe

--
Sent via pgsql-admin mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error installing oracle_fdw extension

Cachique
Hi.
I had this problem a while ago.
It has to do with the way systemd handles environment variables. Apparently systemd isn't aware of exports of variables. It uses a special section in a special file.
Using this post ( https://serverfault.com/questions/413397/how-to-set-environment-variable-in-systemd-service ) I managed to create the extension.

Steps to follow...
* You need to create a directory inside /etc/systemd/system/
  and name it the same as your service with suffix .d -> postgresql-9.5.service.d
* Put inside a file (name is not important) with extension .conf -> orafwd.conf
* In that file specify a section [Service] with your Oracle environment variables.
  Something like this...
[Service]
Environment=ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
Environment=TNS_ADMIN=/u01/app/oracle/product/11.2.0/xe/network/admin
* Article says you can use systemctl edit yourservice but I didn't tried that. Just created the directory and file by myself.
* Names and paths may vary according to your distribution and likes.

Resuming
You have this file...
/etc/systemd/system/postgresql-9.5.service.d/orafdw.conf
With content...
[Service]
Environment=ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
Environment=TNS_ADMIN=/u01/app/oracle/product/11.2.0/xe/network/admin


Check.
When you run systemctl status postgres you see the config file included

[root@localhost ~]# systemctl status postgresql-9.5.service
● postgresql-9.5.service - PostgreSQL 9.5 database server
   Loaded: loaded (/usr/lib/systemd/system/postgresql-9.5.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/postgresql-9.5.service.d
           └─orafdw.conf
   Active: active (running) since Wed 2017-05-17 12:11:49 PYT; 4 days ago






Regards,
Walter






On Mon, May 22, 2017 at 9:12 AM, Albe Laurenz <[hidden email]> wrote:
Sumeet Shukla wrote:
> Yes, postmaster does not seem to be aware of  LD_LIBRARY_PATH. I tried ldconfig and
> postgres service restart but it does not seem to work. How can I fix this.

You first have to add a line to /etc/ld.so.conf that reads
/usr/lib/oracle/12.1/client64/lib

Then run "ldconfig".

> Also the owner of  /usr/lib/oracle/12.1/client64/lib/libclntsh.so.12.1 is root. Please
> confirm if it is OK.

Yes, as long as the PostgreSQL user has permission to read the file.

Yours,
Laurenz Albe

--
Sent via pgsql-admin mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error installing oracle_fdw extension

Sumeet Shukla
Thank You All for jumping in for the help. I was able to install it finally. The problem was with the way I was restarting postgresql service.

The environment variable $LD_LIBRARY_PATH reflects if I use "/etc/init.d/postgresql-9.6 restart" command but it does not reflect if I use "service postgresql-9.6 restart".

I find it little weird since essentially both the commands are internally calling the same service file. Any insight on this would be appreciated.

Warm Regards,
Sumeet Shukla


On Mon, May 22, 2017 at 8:23 PM, Cachique <[hidden email]> wrote:
Hi.
I had this problem a while ago.
It has to do with the way systemd handles environment variables. Apparently systemd isn't aware of exports of variables. It uses a special section in a special file.
Using this post ( https://serverfault.com/questions/413397/how-to-set-environment-variable-in-systemd-service ) I managed to create the extension.

Steps to follow...
* You need to create a directory inside /etc/systemd/system/
  and name it the same as your service with suffix .d -> postgresql-9.5.service.d
* Put inside a file (name is not important) with extension .conf -> orafwd.conf
* In that file specify a section [Service] with your Oracle environment variables.
  Something like this...
[Service]
Environment=ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
Environment=TNS_ADMIN=/u01/app/oracle/product/11.2.0/xe/network/admin
* Article says you can use systemctl edit yourservice but I didn't tried that. Just created the directory and file by myself.
* Names and paths may vary according to your distribution and likes.

Resuming
You have this file...
/etc/systemd/system/postgresql-9.5.service.d/orafdw.conf
With content...
[Service]
Environment=ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
Environment=TNS_ADMIN=/u01/app/oracle/product/11.2.0/xe/network/admin


Check.
When you run systemctl status postgres you see the config file included

[root@localhost ~]# systemctl status postgresql-9.5.service
● postgresql-9.5.service - PostgreSQL 9.5 database server
   Loaded: loaded (/usr/lib/systemd/system/postgresql-9.5.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/postgresql-9.5.service.d
           └─orafdw.conf
   Active: active (running) since Wed 2017-05-17 12:11:49 PYT; 4 days ago






Regards,
Walter






On Mon, May 22, 2017 at 9:12 AM, Albe Laurenz <[hidden email]> wrote:
Sumeet Shukla wrote:
> Yes, postmaster does not seem to be aware of  LD_LIBRARY_PATH. I tried ldconfig and
> postgres service restart but it does not seem to work. How can I fix this.

You first have to add a line to /etc/ld.so.conf that reads
/usr/lib/oracle/12.1/client64/lib

Then run "ldconfig".

> Also the owner of  /usr/lib/oracle/12.1/client64/lib/libclntsh.so.12.1 is root. Please
> confirm if it is OK.

Yes, as long as the PostgreSQL user has permission to read the file.

Yours,
Laurenz Albe

--
Sent via pgsql-admin mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error installing oracle_fdw extension

Albe Laurenz *EXTERN*
Sumeet Shukla wrote:
> The environment variable $LD_LIBRARY_PATH reflects if I use "/etc/init.d/postgresql-9.6
> restart" command but it does not reflect if I use "service postgresql-9.6 restart".
>
> I find it little weird since essentially both the commands are internally calling the same
> service file. Any insight on this would be appreciated.

From "man service":

   ENVIRONMENT
      LANG, TERM
         The only environment variables passed to the init scripts.

Yours,
Laurenz Albe

--
Sent via pgsql-admin mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Previous Thread Next Thread
Loading...