pg_ctl -D "/absolute/path" -m fast restart - doesn't work in some cases

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: pg_ctl -D "/absolute/path" -m fast restart - doesn't work in some cases
Date: 2013-05-16 20:34:49
Message-ID: 20130516203449.GA6559@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

hi,
I have 9.3beta1, and strange problem.

Have running slave pg in directory /home/test/test/slave:

=$ pwd
/home/test/test/slave

=$ cat postmaster.pid
16961
/home/test/test/slave
1368736261
5433
/tmp
*
5433001 7241781

=$ ps uxf
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
...
test 16961 0.2 0.1 173528 12912 pts/7 S 22:31 0:00 /home/pgdba/work/bin/postgres -D test/slave
test 16970 0.0 0.0 27020 812 ? Ss 22:31 0:00 \_ postgres: logger process
test 16971 4.0 0.0 173640 5724 ? Ss 22:31 0:00 \_ postgres: startup process recovering 00000001000000000000001B
test 17008 0.0 0.0 173528 972 ? Ss 22:31 0:00 \_ postgres: checkpointer process
test 17009 0.0 0.0 173528 1244 ? Ss 22:31 0:00 \_ postgres: writer process
test 17028 0.0 0.0 29116 888 ? Ss 22:31 0:00 \_ postgres: stats collector process
test 17029 2.8 0.0 190652 4232 ? Ds 22:31 0:00 \_ postgres: wal receiver process streaming 0/1B7917E0
...

All looks fine. But when I'll try to restart it:

=$ pg_ctl -D $( pwd ) -m fast restart
waiting for server to shut down.... done
server stopped
server starting
postgres cannot access the server configuration file "/home/test/test/slave/test/slave/postgresql.conf": No such file or directory

The problem doesn't exist when I'd start pg with:
1. cd test/slave; pg_ctl -D . start
or
2. pg_ctl -D /home/test/test/slave start

only when Pg is started with relative path, and restarted with absolute, the
problem shows.

I know that it's probably not a big deal for most of the people, but it
did bite me, so I'm reporting it.

Best regards,

depesz

--
The best thing about modern society is how easy it is to avoid contact with it.
http://depesz.com/

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Nelson Minar 2013-05-16 20:45:49 Re: BUG #8167: false EINVAL -22 for opening a file
Previous Message Tom Lane 2013-05-16 19:46:18 Re: easy crash on HEAD