pg_ctl
pg_ctl を使うと、postmaster の
start stop restart status が出来る
データべースの位置は、$PGDATA に設定しておくか -D で指定する。
makoto@u 11:15:05/020215(~)> pg_ctl -w start
pg_ctl: no database directory or environment variable $PGDATA is specified
Try 'pg_ctl --help' for more information.
--help の表示
postgres@u 12:11:01/020304(/home/makoto)> /usr/pkg/bin/pg_ctl -D /a/j/postgres --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
|