PG_AUTOCTL RUN(1) | pg_auto_failover | PG_AUTOCTL RUN(1) |
pg_autoctl run - pg_autoctl run
pg_autoctl run - Run the pg_autoctl service (monitor or keeper)
This commands starts the processes needed to run a monitor node or a keeper node, depending on the configuration file that belongs to the --pgdata option or PGDATA environment variable.
usage: pg_autoctl run [ --pgdata --name --hostname --pgport ] --pgdata path to data directory --name pg_auto_failover node name --hostname hostname used to connect from other nodes --pgport PostgreSQL's port number
When registering Postgres nodes to the pg_auto_failover monitor using the pg_autoctl create postgres command, the nodes are registered with metadata: the node name, hostname and Postgres port.
The node name is used mostly in the logs and pg_autoctl show state commands and helps human administrators of the formation.
The node hostname and pgport are used by other nodes, including the pg_auto_failover monitor, to open a Postgres connection.
Both the node name and the node hostname and port can be changed after the node registration by using either this command (pg_autoctl run) or the pg_autoctl config set command.
The --name option allows using a user-friendly name for your Postgres nodes.
When not provided, a default value is computed by running the following algorithm.
When the forward DNS lookup response in step 3. is an IP address found in one of our local network interfaces, then pg_autoctl uses the hostname found in step 2. as the default --hostname. Otherwise it uses the IP address found in step 1.
You may use the --hostname command line option to bypass the whole DNS lookup based process and force the local node name to a fixed value.
Microsoft
Copyright (c) Microsoft Corporation. All rights reserved.
November 6, 2022 | 2.0 |