Synopsis
The pgd node restart command restarts the Postgres instance on a node, using pg_ctl directly. It doesn't require systemd or another service manager to be configured on the node.
Users and roles
Runs pg_ctl restart as an OS-level operation and doesn't check any PGD or Postgres role. Run the command as the OS user that owns the node's data directory. See User roles.
Syntax
pgd node <NODE_NAME> restart [OPTIONS]
Where <NODE_NAME> is the name of the node to restart.
Options
| Short | Long | Description |
|---|---|---|
-D | --pgdata <PG_DATA> | The data directory of the node. Required. Also set with the PGDATA environment variable. |
--bindir <BINDIR> | Path to the Postgres bin directory. Defaults to the directory where pgd resides. | |
--dbname <DBNAME> | Database to connect to for node-name verification. Defaults to pgddb for PGD nodes, edb for EPAS, or postgres otherwise. | |
-m | --mode <MODE> | Shutdown mode to use before restarting: smart, fast, or immediate (or the first letter of one of these). If omitted, pg_ctl's default (fast) is used. |
-l | --log <FILENAME> | Append the server log to FILENAME. Defaults to postgres-<port>.log in the current directory. |
-W | --no-wait | Don't wait until the operation completes. |
-t | --timeout <SECS> | Seconds to wait when not using -W. Defaults to 60. Also set with the PGCTLTIMEOUT environment variable. |
-s | --silent | Only print errors, no informational messages. Can't be used with --verbose. |
-O | --options <OPTS> | Options to pass through to the postgres command. Repeatable. |
--verbose | Verbose output. Can't be used with --silent. |
See also Global Options.
Examples
Restart the Postgres instance on a node
pgd node kaboom restart --pgdata /var/lib/edb-pge/17/main