.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "PG_AUTOCTL ENABLE MONITOR" "1" "Nov 06, 2022" "2.0" "pg_auto_failover" .SH NAME pg_autoctl enable monitor \- pg_autoctl enable monitor .sp pg_autoctl enable monitor \- Enable a monitor for this node to be orchestrated from .SH SYNOPSIS .sp It is possible to disable the pg_auto_failover monitor and enable it again online in a running pg_autoctl Postgres node. The main use\-cases where this operation is useful is when the monitor node has to be replaced, either after a full crash of the previous monitor node, of for migrating to a new monitor node (hardware replacement, region or zone migration, etc). .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C usage: pg_autoctl enable monitor [ \-\-pgdata \-\-allow\-failover ] postgres://autoctl_node@new.monitor.add.ress/pg_auto_failover \-\-pgdata path to data directory .ft P .fi .UNINDENT .UNINDENT .SH OPTIONS .INDENT 0.0 .TP .B \-\-pgdata Location of the Postgres node being managed locally. Defaults to the environment variable \fBPGDATA\fP\&. Use \fB\-\-monitor\fP to connect to a monitor from anywhere, rather than the monitor URI used by a local Postgres node managed with \fBpg_autoctl\fP\&. .UNINDENT .SH ENVIRONMENT .sp PGDATA .INDENT 0.0 .INDENT 3.5 Postgres directory location. Can be used instead of the \fB\-\-pgdata\fP option. .UNINDENT .UNINDENT .sp PG_AUTOCTL_MONITOR .INDENT 0.0 .INDENT 3.5 Postgres URI to connect to the monitor node, can be used instead of the \fB\-\-monitor\fP option. .UNINDENT .UNINDENT .sp XDG_CONFIG_HOME .INDENT 0.0 .INDENT 3.5 The pg_autoctl command stores its configuration files in the standard place XDG_CONFIG_HOME. See the \fI\%XDG Base Directory Specification\fP\&. .UNINDENT .UNINDENT .sp XDG_DATA_HOME .INDENT 0.0 .INDENT 3.5 The pg_autoctl command stores its internal states files in the standard place XDG_DATA_HOME, which defaults to \fB~/.local/share\fP\&. See the \fI\%XDG Base Directory Specification\fP\&. .UNINDENT .UNINDENT .SH EXAMPLES .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ pg_autoctl show state Name | Node | Host:Port | LSN | Connection | Current State | Assigned State \-\-\-\-\-\-+\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- node1 | 1 | localhost:5501 | 0/4000760 | read\-write | primary | primary node2 | 2 | localhost:5502 | 0/4000760 | read\-only | secondary | secondary $ pg_autoctl enable monitor \-\-pgdata node3 \(aqpostgres://autoctl_node@localhost:5500/pg_auto_failover?sslmode=require\(aq 12:42:07 43834 INFO Registered node 3 (localhost:5503) with name "node3" in formation "default", group 0, state "wait_standby" 12:42:07 43834 INFO Successfully registered to the monitor with nodeId 3 12:42:08 43834 INFO Still waiting for the monitor to drive us to state "catchingup" 12:42:08 43834 WARN Please make sure that the primary node is currently running \(gapg_autoctl run\(ga and contacting the monitor. $ pg_autoctl show state Name | Node | Host:Port | LSN | Connection | Current State | Assigned State \-\-\-\-\-\-+\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- node1 | 1 | localhost:5501 | 0/4000810 | read\-write | primary | primary node2 | 2 | localhost:5502 | 0/4000810 | read\-only | secondary | secondary node3 | 3 | localhost:5503 | 0/4000810 | read\-only | secondary | secondary .ft P .fi .UNINDENT .UNINDENT .SH AUTHOR Microsoft .SH COPYRIGHT Copyright (c) Microsoft Corporation. All rights reserved. .\" Generated by docutils manpage writer. .