Hi,
We use the PAF (https://dalibo.github.io/PAF/) to manage the postgresql.
According to user's requirement, we could not use trust mode in the pg_hba.conf file. So when running psql, it will ask us to input the password and we have to input the password manually.
So the pcs status show the following error:
* pgsqld_stop_0 on node1-pri 'unknown error' (1): call=34, status=complete, exitreason='Unexpected state for instance "pgsqld" (returned 1)',
last-rc-change='Wed Mar 6 09:09:46 2019', queued=0ms, exec=504ms
The cause of the error is that the PAF (/usr/lib/ocf/resource.d/heartbeat/pgsqlms) will ask to input the password and we could not pass the password to psql command in the PAF script.
exec $PGPSQL, '--set', '_ON_ERROR_STOP_=1', '-qXAtf', $tmpfile,
'-R', $RS, '-F', $FS, '--port', $pgport, '--host', $pghost,'--username','sysdba',
Is there any way for us to pass the password to the psql command in the PAF script?
We have tried to add the "export PGPASSWORD=123456" in the /etc/profile and it does not work.
thanks