From: | Mark Street <mark(dot)street(at)instinctsystems(dot)com(dot)au> |
---|---|
To: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Setting Variables within the PostgreSQL Service Process on AWS Linux |
Date: | 2017-08-04 02:40:46 |
Message-ID: | 0B70CE06-A480-4E21-86AF-7055ECB17D6D@instinctsystems.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi All,
I was hoping someone could point me in the right direction. I want to use Python 3.4 with AWS Linux and PostgreSQL 9.4. By default AWS Linux OS users Python2.7. I am trying to set the following variable in the PostgreSQL startup service
PYTHONPATH=/usr/lib64/python3.4
Below is a snippet from the service:
--------------------------------------------------------------------------------------------------------
# Set defaults for configuration variables
PGENGINE=/usr/pgsql-9.1/bin
PGPORT=5432
PGDATA=/var/lib/pgsql/9.1/data
PGLOG=/var/lib/pgsql/9.1/pgstartup.log
lockfile="/var/lock/subsys/${NAME}"
pidfile="/var/run/${NAME}.pid"
PYTHONPATH=/usr/lib64/python3.4
# Override defaults from /etc/sysconfig/pgsql if file is present
[ -f /etc/sysconfig/pgsql/${NAME} ] && . /etc/sysconfig/pgsql/${NAME}
export PGDATA
export PGPORT
export PYTHONPATH
-----------------------------------------------------------------------------------------------------------
The variable is never loaded to the PID. When I do the same thing with Centos 7 it works fine. The only way I can get the PostgreSQL PID to see the variable is to set a global one in the /etc/profile.d directory. This unfortunately breaks AWS Linux utilities that use Python2.7.
Any help would be appreciated.
Regards,
Mark Street
From | Date | Subject | |
---|---|---|---|
Next Message | Lucas Possamai | 2017-08-04 04:03:59 | Re: hot standby questions |
Previous Message | Alban Hertroys | 2017-08-04 01:32:53 | Re: cast issue in WITH RECURION |