Thread: [BUG] pg_ctl restart at the vanilla v8.3.4

[BUG] pg_ctl restart at the vanilla v8.3.4

From
KaiGai Kohei
Date:
When I run "pg_ctl restart" of the vanilla pgsql-8.3.4 without any options,
it does not work correctly.

-------- cut here --------
[kaigai@saba postgresql-8.3.4]$ ./root/bin/pg_ctl restart
LOG:  received smart shutdown request
LOG:  autovacuum launcher shutting down
waiting for server to shut down....LOG:  shutting down
LOG:  database system is shut downdone
server stopped
sh: -c: line 0: syntax error near unexpected token `null'
sh: -c: line 0: `"/home/kaigai/tmp/postgresql-8.3.4/root/bin/postgres" (null) < "/dev/null" 2>&1 &'
pg_ctl: could not start server: exit code was 512
[kaigai@saba postgresql-8.3.4]$
--------------------------

On pgsql-8.3.3, an empty string ("") is set to post_opts at read_post_opts()
when no command line options are given, but this code has gone at v8.3.4 and
NULL is remained.
This variable is used to make an argument of system() at start_postmaster(),
then /bin/sh claims it due to invalid command line.

Thanks,
-- 
OSS Platform Development Division, NEC
KaiGai Kohei <kaigai@ak.jp.nec.com>


Re: [BUG] pg_ctl restart at the vanilla v8.3.4

From
Tom Lane
Date:
KaiGai Kohei <kaigai@ak.jp.nec.com> writes:
> When I run "pg_ctl restart" of the vanilla pgsql-8.3.4 without any options,
> it does not work correctly.

Confirmed here, and fixed.  HEAD was all right, the back branches not so
much.
        regards, tom lane