pg_autoctl: add commands and options required by the pgaftest runner - #1135
Merged
Conversation
Four additions that pgaftest specs and the pg_autoctl node runner depend on: 1. pg_autoctl do pgsetup hba-lan Appends LAN CIDR trust rules to pg_hba.conf and reloads Postgres. Used by citus pgaftest specs to configure cross-container auth. 2. pg_autoctl do pgsetup wait --timeout N Dedicated getopts accepting --pgdata and --timeout N; the previous shared getopts silently ignored --timeout, so callers could not set a custom wait budget. 3. pg_autoctl drop node --no-wait Sets listen_notifications_timeout to 0 (skip waiting for monitor confirmation); used by pgaftest teardown when the monitor is absent. 4. pg_autoctl create postgres --replication-password / --monitor-password Accepts the passwords emitted by pg_autoctl node run when a nodespec.ini has auth configured, preventing container exit(1) on unrecognised options.
This was referenced Jul 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four small additions to
pg_autoctlthat the upcoming pgaftest binary and its.pgaftest specs depend on. No new external dependencies — all changes build on existing infrastructure already inmain.Changes
pg_autoctl do pgsetup hba-lan(cli_do_root.c,cli_do_misc.c)Appends LAN CIDR trust rules to
pg_hba.confand reloads Postgres. Used by Citus pgaftest specs to configure cross-container authentication without rewriting the entire HBA file.pg_autoctl do pgsetup wait --timeout N(cli_do_root.c,cli_do_misc.c)Dedicated
getoptsfunction accepting--pgdataand--timeout; the previous getopts was shared with the keeper setup path and silently ignored--timeout, so callers could not set a custom wait budget.pg_autoctl drop node --no-wait(cli_drop_node.c)Sets
listen_notifications_timeoutto 0, skipping the wait for monitor confirmation. Used by pgaftest teardown steps when the monitor container is already gone.pg_autoctl create postgres --replication-password/--monitor-password(cli_common.c)Accepts the passwords emitted by
pg_autoctl node runwhen anodespec.inihas auth configured. Without this, the container exits immediately with "unrecognised option".Testing
citus_indent --checkclean)TEST=monitor make run-test(PG17): 19 passed — the 1 failure (test_replace_monitor::test_001_init_primary) reproduces identically onmainwith no changes (pre-existing flake, state-file race at startup)