PG_AUTOCTL_CREATE_COORDINATOR(1)
π PG_AUTOCTL CREATE COORDINATOR β bestie edition π
okay so real quick, this whole thing lives in the pg_auto_failover manual, and it's about one very specific little guy: pg_autoctl create coordinator. she's the boss of the Citus formation and she's about to tell you exactly how to summon her β¨
β¨ NAME β¨
pg_autoctl create coordinator β pg_autoctl create coordinator
pg_autoctl create coordinator β Initialize a pg_auto_failover coordinator node
π¦ SYNOPSIS π¦
The command pg_autoctl create coordinator initializes a pg_auto_failover Coordinator node for a Citus formation. The coordinator is special in a Citus formation: that's where the client application connects to either to manage the formation and the sharding of the tables, or for its normal SQL traffic.
The coordinator also has to register every worker in the formation.
usage: pg_autoctl create coordinator
--pgctl path to pg_ctl
--pgdata path to data directory
--pghost PostgreSQL's hostname
--pgport PostgreSQL's port number
--hostname hostname by which postgres is reachable
--listen PostgreSQL's listen_addresses
--username PostgreSQL's username
--dbname PostgreSQL's database name
--name pg_auto_failover node name
--formation pg_auto_failover formation
--monitor pg_auto_failover Monitor Postgres URL
--auth authentication method for connections from monitor
--skip-pg-hba skip editing pg_hba.conf rules
--citus-secondary when used, this worker node is a citus secondary
--citus-cluster name of the Citus Cluster for read-replicas
--ssl-self-signed setup network encryption using self signed certificates (does NOT protect against MITM)
--ssl-mode use that sslmode in connection strings
--ssl-ca-file set the Postgres ssl_ca_file to that file path
--ssl-crl-file set the Postgres ssl_crl_file to that file path
--no-ssl don't enable network encryption (NOT recommended, prefer --ssl-self-signed)
--server-key set the Postgres ssl_key_file to that file path
--server-cert set the Postgres ssl_cert_file to that file path
πΈ DESCRIPTION πΈ
So this command does literally everything pg_autoctl create postgres does (same energy, same vibes), and then it does these three extra little side quests:
- adds
shared_preload_libraries = citusto the local PostgreSQL instance configuration. - enables the whole local area network to connect to the coordinator, by adding an entry for e.g.
192.168.1.0/24in the PostgreSQL HBA configuration. - creates the extension
citusin the target database.
IMPORTANT, bestie, pls read this one π: The default--dbnameis the same as the current system user name, which in many case is going to bepostgres. Please make sure to use the--dbnameoption with the actual database that you're going to use with your application. Citus does not support multiple databases, you have to use the database where Citus is created. When using Citus, that is essential to the well behaving of worker failover.
π OPTIONS π
See the manual page for pg_autoctl create postgres for the common options. This section now lists the options that are specific to pg_autoctl create coordinator:
--citus-secondaryβ Use this option to create a coordinator dedicated to a Citus Secondary cluster.
See Citus Secondaries and read-replica for more information.
--citus-clusterβ Use this option to name the Citus Secondary cluster that this coordinator node belongs to. Use the same cluster name again for the worker nodes that are part of this cluster.
See Citus Secondaries and read-replica for more information.
π AUTHOR π
Microsoft
π COPYRIGHT π
Copyright (c) Microsoft Corporation. All rights reserved.
okay that's the whole page, you ate that π«Ά this was version 2.1, dated Jan 18, 2025 β go forth and create your coordinator, no cap πβ¨
π¦ where this page comes from
- fedora 43: pg_auto_failover 2.1-6.fc42 Β· Apache-1.0
- fedora 44: pg_auto_failover 2.1-6.fc42 Β· Apache-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms