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.

Re: "pg_ctl restart" in 7.1.2

From
Peter Eisentraut
Date:
Trond Eivind Glomsrød writes:

> "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$

There was a bug related to this fixed in 7.1.2.  I think you are trying to
restart with 7.1.2 pg_ctl an installation that was initially started with
7.1.1 or earlier, or vice versa.  I guess that doesn't work.  :-(

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


Re: "pg_ctl restart" in 7.1.2

From
teg@redhat.com (Trond Eivind Glomsrød)
Date:
Peter Eisentraut <peter_e@gmx.net> writes:

> Trond Eivind Glomsrød writes:
>
> > "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$
>
> There was a bug related to this fixed in 7.1.2.  I think you are trying to
> restart with 7.1.2 pg_ctl an installation that was initially started with
> 7.1.1 or earlier, or vice versa.  I guess that doesn't work.  :-(

No, this is 7.1.2 fresh install. I'm working with the initscripts in
the rpm dist to make it work with locales properly, as the current 7.1
way of setting "C" gives invalid results for Norwegian and others.

--
Trond Eivind Glomsrød
Red Hat, Inc.