From: | Thom Brown <thom(at)linux(dot)com> |
---|---|
To: | pgsql-bugs <pgsql-bugs(at)postgresql(dot)org> |
Subject: | pg_ctl restart issue with relative paths |
Date: | 2012-10-13 22:56:43 |
Message-ID: | CAA-aLv72O+NegjAipHORmbqSMZTkZayaTxrd+C9v60YbmMmZUQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Hi,
I have noticed that, using pg_ctl, if you start Postgres using a
relative path, then attempt to restart it from anywhere else, it
fails.
Example:
thom(at)swift /tmp $ pg_ctl -D primary start
server starting
thom(at)swift /tmp $ pg_ctl -D primary restart
waiting for server to shut down.... done
server stopped
server starting
thom(at)swift /tmp $ cd
thom(at)swift ~ $ pg_ctl -D /tmp/primary restart
waiting for server to shut down.... done
server stopped
server starting
thom(at)swift ~ $ postgres cannot access the server configuration file
"/home/thom/primary/postgresql.conf": No such file or directory
thom(at)swift ~ $ cd /tmp/primary
thom(at)swift /tmp/primary $ pg_ctl -D /tmp/primary restart
pg_ctl: PID file "/tmp/primary/postmaster.pid" does not exist
Is server running?
starting server anyway
server starting
thom(at)swift /tmp/primary $ postgres cannot access the server
configuration file "/tmp/primary/primary/postgresql.conf": No such
file or directory
thom(at)swift /tmp/primary $ cd ..
thom(at)swift /tmp $ pg_ctl -D /tmp/primary restart
pg_ctl: PID file "/tmp/primary/postmaster.pid" does not exist
Is server running?
starting server anyway
server starting
This issue does not occur if stopping then starting. I suspect the
blame lies with postmaster.opts not storing the resolved absolute
path.
OS: Linux Mint 13 64-bit
PostgreSQL version: 9.1.6 at least (just the stable version I tested
on), and git master
--
Thom
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2012-10-14 05:49:29 | Re: BUG #7592: Installation of PostGresql at c:\Progam files folder does not create right permission on data folder |
Previous Message | Fujii Masao | 2012-10-13 16:35:12 | Re: BUG #7534: walreceiver takes long time to detect n/w breakdown |