Skip to content

pgrac-start: false "node does not match" warning when pgrac.conf is shared across nodes #8

Description

@sqlrush

Summary

pgrac-start preflight warns when the first [node.N] section in
pgrac.conf doesn't match this node's cluster.node_id. But the recommended
setup uses one identical pgrac.conf shared by every node, so on any node
whose id isn't the first-listed one the warning fires even though the config is
correct and startup succeeds.

Current behavior

With a shared pgrac.conf listing [node.0] then [node.1], starting node 1
prints:

pgrac-start: WARNING: /path/pgrac.conf first [node.0] does not match postgresql.conf cluster.node_id=1
pgrac-start: WARNING: postmaster will FATAL on startup unless cluster.node_id appears as a [node.N] in pgrac.conf.  Run pgrac-init --force to fix.

…then the server starts fine, because node 1 is declared (as [node.1]). The
warning is a false positive and the suggested pgrac-init --force is misleading.

Desired behavior

Warn only on the real failure: cluster.node_id does not appear as
any [node.N] section. When the id is present (in any position), don't warn.

Why this is a good first issue

  • It's in a bash script (src/bin/pgrac/pgrac-start), not the C backend.
  • Current logic reads only the first [node.N]; the fix is to scan for all
    declared node ids and test membership.
  • There's already a TAP test to extend: src/bin/pgrac/t/002_start.pl.

Definition of done

  • No warning when cluster.node_id is declared as some [node.N], regardless
    of order.
  • Still warns clearly when the id is genuinely absent.
  • A regression test in t/002_start.pl: a shared multi-node pgrac.conf
    started as a non-first node asserts no warning.

Pointers

  • src/bin/pgrac/pgrac-start — preflight that reads the first [node.N] and
    emits the WARNING: ... first [node. lines.
  • src/bin/pgrac/t/002_start.pl — existing start tests.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions