OpenServerPanel/modules/PostgreSQL-9.6/ospanel_data/help/pg_ctl.exe.txt
2024-01-25 22:33:10 +03:00

59 lines
2.5 KiB
Plaintext

pg_ctl is a utility to initialize, start, stop, or control a PostgreSQL server.
Usage:
pg_ctl init[db] [-D DATADIR] [-s] [-o "OPTIONS"]
pg_ctl start [-w] [-t SECS] [-D DATADIR] [-s] [-l FILENAME] [-o "OPTIONS"]
pg_ctl stop [-W] [-t SECS] [-D DATADIR] [-s] [-m SHUTDOWN-MODE]
pg_ctl restart [-w] [-t SECS] [-D DATADIR] [-s] [-m SHUTDOWN-MODE]
[-o "OPTIONS"]
pg_ctl reload [-D DATADIR] [-s]
pg_ctl status [-D DATADIR]
pg_ctl promote [-D DATADIR] [-s]
pg_ctl kill SIGNALNAME PID
pg_ctl register [-N SERVICENAME] [-U USERNAME] [-P PASSWORD] [-D DATADIR]
[-S START-TYPE] [-w] [-t SECS] [-o "OPTIONS"]
pg_ctl unregister [-N SERVICENAME]
Common options:
-D, --pgdata=DATADIR location of the database storage area
-e SOURCE event source for logging when running as a service
-s, --silent only print errors, no informational messages
-t, --timeout=SECS seconds to wait when using -w option
-V, --version output version information, then exit
-w wait until operation completes
-W do not wait until operation completes
-?, --help show this help, then exit
(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:
-c, --core-files not applicable on this platform
-l, --log=FILENAME write (or append) server log to FILENAME
-o OPTIONS command line options to pass to postgres
(PostgreSQL server executable) or initdb
-p PATH-TO-POSTGRES normally not necessary
Options for stop or restart:
-m, --mode=MODE MODE can 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 on restart
Allowed signal names for kill:
ABRT HUP INT QUIT TERM USR1 USR2
Options for register and unregister:
-N SERVICENAME service name with which to register PostgreSQL server
-P PASSWORD password of account to register PostgreSQL server
-U USERNAME user name of account to register PostgreSQL server
-S START-TYPE service start type to register PostgreSQL server
Start types are:
auto start service automatically during system startup (default)
demand start service on demand
Report bugs to <pgsql-bugs@postgresql.org>.