Thread: "pg_ctl restart" in 7.1.2

"pg_ctl restart" in 7.1.2

From
teg@redhat.com (Trond Eivind Glomsrød)
Date:
"pg_ctl restart" seems to not work as documented in postgresql 7.1.2.

bash-2.04$ /usr/bin/pg_ctl restart -w -D /var/lib/pgsql/data -m fast
waiting for postmaster to shut down......done
postmaster successfully shut down
/usr/bin/postmaster: invalid argument -- '-D'
Try '/usr/bin/postmaster --help' for more information.
waiting for postmaster to
start................................................................failed
pg_ctl: postmaster does not start
bash-2.04$

(it was ctrl-C'ed after taking forever in "start...")

The documentation says this is a valid combination, or am I missing something?

[root@xyzzy2 data]# pg_ctl --help
pg_ctl is a utility to start, stop, restart, and report the status
of a PostgreSQL server.

Usage:
  pg_ctl start   [-w] [-D DATADIR] [-s] [-l FILENAME] [-o "OPTIONS"]
  pg_ctl stop    [-W] [-D DATADIR] [-s] [-m SHUTDOWN-MODE]
  pg_ctl restart [-w] [-D DATADIR] [-s] [-m SHUTDOWN-MODE] [-o "OPTIONS"]
  pg_ctl status  [-D DATADIR]

Common options:
  -D DATADIR            Location of the database storage area
  -s                    Only print errors, no informational messages
  -w                    Wait until operation completes
  -W                    Do not wait until operation completes
(The default is to wait for shutdown, but not for start or restart.)

If the -D option is omitted, the environment variable PGDATA is used.

Options for start or restart:
  -l FILENAME           Write (or append) server log to FILENAME.  The
                        use of this option is highly recommended.
  -o OPTIONS            Command line options to pass to the postmaster
                        (PostgreSQL server executable)
  -p PATH-TO-POSTMASTER Normally not necessary

Options for stop or restart:
  -m SHUTDOWN-MODE      May be 'smart', 'fast', or 'immediate'

Shutdown modes are:
  smart                 Quit after all clients have disconnected
  fast                  Quit directly, with proper shutdown
  immediate             Quit without complete shutdown; will lead
                        to recovery run on restart

Report bugs to <pgsql-bugs@postgresql.org>.
[root@xyzzy2 data]#
--
Trond Eivind Glomsrød
Red Hat, Inc.