PG_AUTOCTL_SET_NODE_REPLICATION-QUORUM(1)
π pg_autoctl set node replication-quorum β the manual, but make it cute π
okay bestie, welcome to PG_AUTOCTL SET NODE REPLICATION-QUORUM(1), the section-1 manual page for the pg_autoctl girlies (and fellas, and everyone in between). this one's about flipping the replication-quorum switch on a node and making the monitor actually listen. it's giving "small command, big consequences" energy. let's get into it. π¦
β¨ NAME β¨
pg_autoctl set node replication-quorum β literally just pg_autoctl set node replication-quorum.
pg_autoctl set replication-quorum β sets the replication-quorum property from the monitor. that's the whole job. no cap. π
πΈ SYNOPSIS πΈ
this command sets the pg_autoctl replication quorum for a given node, like so:
usage: pg_autoctl set node replication-quorum [ --pgdata ] [ --json ] [ --formation ] [ --name ] <true|false>
--pgdata path to data directory
--formation pg_auto_failover formation
--name pg_auto_failover node name
--json output data in the JSON format
so yes, you do have to hand it a <true|false> at the end. it's not gonna guess your vibe for you. π
π DESCRIPTION π
if you wanna see the whole menu of replication settings (not just this one), go check out pg_autoctl show settings. it's the full list, the whole collection, the complete era. π
π OPTIONS π
--pgdataβ where the Postgres node you're managing lives locally. defaults to the environment variablePGDATA. and hey, if you'd rather connect to a monitor from literally anywhere instead of using the monitor URI that a local Postgres node managed withpg_autoctlis using, use--monitorinstead. slay. β¨--jsonβ output JSON formatted data. that's it, that's the option. π€--formationβ show replication settings for the given formation. defaults todefault, because of course it does.--nameβ show replication settings for the given node, selected by name. gotta name names, bestie. π
π ENVIRONMENT π
PGDATAPostgres directory location. you can use this instead of the--pgdataoption. same energy, different spelling.PG_AUTOCTL_MONITORPostgres URI to connect to the monitor node. works instead of the--monitoroption. so if you're allergic to flags, this is your moment. π₯XDG_CONFIG_HOMEthepg_autoctlcommand stores its configuration files in the standard placeXDG_CONFIG_HOME. see the XDG Base Directory Specification. it's very "i read the spec" of it.XDG_DATA_HOMEthepg_autoctlcommand stores its internal states files in the standard placeXDG_DATA_HOME, which defaults to~/.local/share. see the XDG Base Directory Specification. again. the spec stays winning.
π§ EXAMPLES π§
turning it OFF, in all its verbose glory:
$ pg_autoctl set node replication-quorum --name node1 false
12:49:37 94092 INFO Waiting for the settings to have been applied to the monitor and primary node
12:49:37 94092 INFO New state is reported by node 1 "node1" (localhost:5501): "apply_settings"
12:49:37 94092 INFO Setting goal state of node 1 "node1" (localhost:5501) to primary after it applied replication properties change.
12:49:37 94092 INFO New state is reported by node 1 "node1" (localhost:5501): "primary"
false
and now turning it ON, but make it JSON:
$ pg_autoctl set node replication-quorum --name node1 true --json
12:49:42 94199 INFO Waiting for the settings to have been applied to the monitor and primary node
12:49:42 94199 INFO New state is reported by node 1 "node1" (localhost:5501): "apply_settings"
12:49:42 94199 INFO Setting goal state of node 1 "node1" (localhost:5501) to primary after it applied replication properties change.
12:49:43 94199 INFO New state is reported by node 1 "node1" (localhost:5501): "primary"
{
"replication-quorum": true
}
see how it waits, applies, reports, and then hands you the answer? that's the whole arc. character development, honestly. ππ
π AUTHOR π
Microsoft
β COPYRIGHT β
Copyright (c) Microsoft Corporation. All rights reserved.
and that's the page, bestie!! π«Ά this was PG_AUTOCTL SET NODE REPLICATION-QUORUM(1), version 2.1, dated Jan 18, 2025, and yes β that's the manual name, the version and the date, all right here in the sign-off so the footer didn't have to be boring. go forth and quorum responsibly. πβ¨π
π¦ 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