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.
Summary
pgrac-startpreflight warns when the first[node.N]section inpgrac.confdoesn't match this node'scluster.node_id. But the recommendedsetup uses one identical
pgrac.confshared by every node, so on any nodewhose 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.conflisting[node.0]then[node.1], starting node 1prints:
…then the server starts fine, because node 1 is declared (as
[node.1]). Thewarning is a false positive and the suggested
pgrac-init --forceis misleading.Desired behavior
Warn only on the real failure:
cluster.node_iddoes not appear asany
[node.N]section. When the id is present (in any position), don't warn.Why this is a good first issue
src/bin/pgrac/pgrac-start), not the C backend.[node.N]; the fix is to scan for alldeclared node ids and test membership.
src/bin/pgrac/t/002_start.pl.Definition of done
cluster.node_idis declared as some[node.N], regardlessof order.
t/002_start.pl: a shared multi-nodepgrac.confstarted as a non-first node asserts no warning.
Pointers
src/bin/pgrac/pgrac-start— preflight that reads the first[node.N]andemits the
WARNING: ... first [node.lines.src/bin/pgrac/t/002_start.pl— existing start tests.