PG_AUTOCTL_STATUS(1)

πŸ“¦
version 2.1 Β· 2 versions
, in fedora 43, fedora 44

πŸ’… PG_AUTOCTL STATUS(1) β€” the pg_autoctl status page, bestie edition

okay so you're looking at the manual page for pg_autoctl status, and it lives inside the pg_auto_failover manual. Manual name's right there, no need to go hunting πŸŽ€


✨ NAME ✨

pg_autoctl status β€” pg_autoctl status

pg_autoctl status β€” Display the current status of the pg_autoctl service


πŸ¦‹ SYNOPSIS πŸ¦‹

This command outputs the current process status for the pg_autoctl service running for the given --pgdata location.

usage: pg_autoctl status  [ --pgdata ] [ --json ]

--pgdata      path to data directory
--json        output data in the JSON format

πŸ‘‘ OPTIONS πŸ‘‘

  • --pgdata β€” where your Postgres node lives locally, like, the one being managed. Defaults to the environment variable PGDATA, so if you already set that you don't gotta type it πŸ’…
  • --json β€” instead of a cute little table-formatted list, you get JSON formatted data. very giving "machine readable", slay.

🌸 ENVIRONMENT 🌸

  • PGDATA β€” Postgres directory location. Can be used instead of the --pgdata option. (yes bestie, it's the substitute, use it.)
  • PG_AUTOCTL_MONITOR β€” Postgres URI to connect to the monitor node.
  • XDG_CONFIG_HOME β€” the pg_autoctl command stores its configuration files in the standard place XDG_CONFIG_HOME. See the XDG Base Directory Specification.
  • XDG_DATA_HOME β€” the pg_autoctl command stores its internal states files in the standard place XDG_DATA_HOME, which defaults to ~/.local/share. See the XDG Base Directory Specification.

🌈 EXAMPLE 🌈

no cap, here's what it actually looks like:

$ pg_autoctl status --pgdata node1
11:26:30 27248 INFO  pg_autoctl is running with pid 26618
11:26:30 27248 INFO  Postgres is serving PGDATA "/Users/dim/dev/MS/pg_auto_failover/tmux/node1" on port 5501 with pid 26725

$ pg_autoctl status --pgdata node1 --json
11:26:37 27385 INFO  pg_autoctl is running with pid 26618
11:26:37 27385 INFO  Postgres is serving PGDATA "/Users/dim/dev/MS/pg_auto_failover/tmux/node1" on port 5501 with pid 26725
{
    "postgres": {
        "pgdata": "\/Users\/dim\/dev\/MS\/pg_auto_failover\/tmux\/node1",
        "pg_ctl": "\/Applications\/Postgres.app\/Contents\/Versions\/12\/bin\/pg_ctl",
        "version": "12.3",
        "host": "\/tmp",
        "port": 5501,
        "proxyport": 0,
        "pid": 26725,
        "in_recovery": false,
        "control": {
            "version": 0,
            "catalog_version": 0,
            "system_identifier": "0"
        },
        "postmaster": {
            "status": "ready"
        }
    },
    "pg_autoctl": {
        "pid": 26618,
        "status": "running",
        "pgdata": "\/Users\/dim\/dev\/MS\/pg_auto_failover\/tmux\/node1",
        "version": "1.5.0",
        "semId": 196609,
        "services": [
            {
                "name": "postgres",
                "pid": 26625,
                "status": "running",
                "version": "1.5.0",
                "pgautofailover": "1.5.0.1"
            },
            {
                "name": "node-active",
                "pid": 26626,
                "status": "running",
                "version": "1.5.0",
                "pgautofailover": "1.5.0.1"
            }
        ]
    }
}

like… look at all those pids and services living their truth 😭 iconic.


🫢 AUTHOR 🫢

Microsoft


Copyright (c) Microsoft Corporation. All rights reserved.


ok that's the whole page, you read all of it, main character energy fr fr 🧚

and a lil sign-off for the girlies: this is version 2.1, dated Jan 18, 2025, and yeah it's the PG_AUTOCTL STATUS(1) page, periodt πŸ’–βœ¨

πŸ“¦ where this page comes from