PG_CTL(1) PostgreSQL 18.6 Documentation PG_CTL(1) (NAME) pg_ctl - PostgreSQL (SYNOPSIS) pg_ctl init[db] [-D datadir] [-s] [-o initdb-options] pg_ctl start [-D datadir] [-l filename] [-W] [-t seconds] [-s] [-o options] [-p path] [-c] pg_ctl stop [-D datadir] [-m s[mart] | f[ast] | i[mmediate]] [-W] [-t seconds] [-s] pg_ctl restart [-D datadir] [-m s[mart] | f[ast] | i[mmediate]] [-W] [-t seconds] [-s] [-o options] [-c] pg_ctl reload [-D datadir] [-s] pg_ctl status [-D datadir] pg_ctl promote [-D datadir] [-W] [-t seconds] [-s] pg_ctl logrotate [-D datadir] [-s] pg_ctl kill signal_name process_id Microsoft Windows: pg_ctl register [-D datadir] [-N servicename] [-U username] [-P password] [-S a[uto] | d[emand]] [-e source] [-W] [-t seconds] [-s] [-o options] pg_ctl unregister [-N servicename] (DESCRIPTION) pg_ctl PostgreSQL PostgreSQL (postgres(1)) . pg_ctl (logs) (process group) . . init initdb PostgreSQL . initdb . initdb(1) . start . /dev/null ( nul) . pg_ctl ( ) . pg_ctl (pipe) rotatelogs postgres ( ) . Windows . -l . -l . stop . -m . "Smart" . hot standby (streaming replication) . "Fast" ( ) . rollback . "Immediate" . (crash-recovery) . restart . postgres . restart pg_ctl . reload SIGHUP postgres (postgresql.conf pg_hba.conf ) . . status . PID . pg_ctl 3 . pg_ctl 4 . promote standby standby / . logrotate (rotate ). Section 24.3 . kill . Microsoft Windows kill . --help . register PostgreSQL Microsoft Windows . -S "auto" ( ) "demand" ( ) . unregister Microsoft Windows ( ) . register ..SH " (OPTIONS)" -c --core-files core (soft resource limit) core. stack trace . -D datadir --pgdata=datadir . PGDATA . -l filename --log=filename (log) filename. . . . -m mode --mode=mode (shutdown) . mode smart fast immediate . fast . -o options --options=options postgres . -o . options . -o initdb-options --options=initdb-options initdb . -o . initdb-options . -p path postgres . postgres pg_ctl (hard-wired). postgres . init initdb . -s --silent . -t seconds --timeout=seconds ( -w ). PGCTLTIMEOUT 60 . -V --version pg_ctl . -w --wait . start stop restart promote register . pg_ctl PID (sleep) . (Startup) PID . (Shutdown) PID . pg_ctl . (timeout) ( -t ) pg_ctl . . -W --no-wait . -w . . . PostgreSQL stop. -? --help pg_ctl . pg_ctl ..SS " (Options for Windows)" -e source pg_ctl . PostgreSQL . pg_ctl event_source . PostgreSQL . -N servicename . . PostgreSQL . -P password . -S start-type . start-type auto demand . auto . -U username . DOMAIN\username . (ENVIRONMENT) PGCTLTIMEOUT . . PGDATA . pg_ctl -D PGDATA . postgres(1) . (FILES) postmaster.pid pg_ctl . postmaster.opts pg_ctl ( restart) postgres -o . status . : $ pg_ctl start 5433 fsync : $ pg_ctl -o "-F -p 5433" start : $ pg_ctl stop -m : $ pg_ctl stop -m smart pg_ctl . : $ pg_ctl restart -o . 5433 fsync : $ pg_ctl -o "-F -p 5433" restart pg_ctl : $ pg_ctl status pg_ctl: server is running (PID: 13718) /usr/local/pgsql/bin/postgres "-D" "/usr/local/pgsql/data" "-p" "5433" "-B" "128" restart . (SEE ALSO) initdb(1), postgres(1) PostgreSQL 18.6 2026 PG_CTL(1)