Skip to content

Preserve PostgreSQL node identities across role changes - #26

Merged
gauravtiwari merged 1 commit into
mainfrom
stable-node-identities
Oct 2, 2026
Merged

gauravtiwari merged 1 commit into
mainfrom
stable-node-identities

Conversation

@gauravtiwari

Copy link
Copy Markdown
Contributor

After a switchover, moving a host from standby to primary in configuration previously changed its generated repmgr ID to 1. Reordering standbys could also change their identities.

Allow an explicit node_id on each host and use it in repmgr templates, clone setup and registration checks. Reject invalid or duplicate IDs before deployment. Existing configurations retain their current defaults. Document how to preserve existing IDs when changing roles and prepare version 0.9.8.

Validation: 366 tests and 1,097 assertions pass, RuboCop passes, the dependency audit reports no vulnerabilities, and the gem builds. The new tests cover role changes, reordered standbys, ID collisions and invalid values.

@gauravtiwari
gauravtiwari merged commit 216490f into main Oct 2, 2026
4 checks passed
@gauravtiwari
gauravtiwari deleted the stable-node-identities branch October 2, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant