I installed postgresql in a jail, it starts automatically after adding
/etc/rc.conf), but now I can't stop it.
/usr/local/etc/rc.d/postgresql stop, but I've got:
pg_ctl: PID file "/usr/local/pgsql/data/postmaster.pid" does not exist Is server running?
But of course it is runnging, I can connect to it using
psql, also when I do
ps ax|grep postgres I get:
15411 - SsJ 0:00.07 postgres: logger process (postgres) 15412 - SsJ 0:00.05 postgres: startup process (postgres) 15413 - SsJ 0:00.01 postgres: checkpointer process (postgres) 15414 - SsJ 0:00.02 postgres: writer process (postgres) 15415 - SsJ 0:00.00 postgres: stats collector process (postgres) 15410 2 SJ 0:00.17 /usr/local/bin/postgres -D /usr/local/pgsql/data
I need to gracefully stop it from a script, how can I do this?.
I think the init scripts are confused because my
data_directory is different the default
ConfigDir, in fact, the PID file is created in my
data_directory which points to