I'm having trouble restarting dockerized postgres database (I am using Core OS). The database is launched in a bash script using the command
which is working. I have another script called by confd that runs when some keys change, etc. (This part is fine, the file is being called correctly) and should restart postgres (not restart, because some configuration changes require a restart). Here are the main options I tried that failed ...
systematically causes an error:
%FATAL: lock file "postmaster.pid" already exists %HINT: Is another postmaster (PID 273) running in data directory "/var/lib/postgresql/9.3/main"?
Moreover,
rm /var/lib/postgresql/9.3/main/postmaster.pid /etc/init.d/postgresql start
/etc/init.d/postgresql restart
and
exec su postgres -c "/usr/lib/postgresql/9.3/bin/postgres -D /var/lib/postgresql/9.3/main -c config_file=/etc/postgresql/9.3/main/postgresql.conf"
glitch
ERROR exit status 1
Any thought? Thank you in advance!
source share