Skip to content

Fix PostgreSQL standby password repair requeue#39

Open
im0x0ing wants to merge 1 commit into
labring:fix/v0.9.3from
im0x0ing:fix-standby-password-repair-requeue
Open

Fix PostgreSQL standby password repair requeue#39
im0x0ing wants to merge 1 commit into
labring:fix/v0.9.3from
im0x0ing:fix-standby-password-repair-requeue

Conversation

@im0x0ing

Copy link
Copy Markdown
Collaborator

Read standby password only from replica pgpass files and stop falling back to PGPASSWORD_STANDBY. This avoids using leader-local or environment-derived credentials as the repair source.

Treat missing pgpass files and pgpass files without a standby entry as an unavailable password source. The repair now records a StandbyPasswordUnavailable condition and stops requeueing for those non-transient states, while still requeueing real exec/runtime failures.

Allow the repair transformer to run while the PostgreSQL component is Running, Updating, or Abnormal, and skip single-replica components that have no replica password source.

Add focused tests for replica-only password sourcing, unavailable pgpass handling, non-running eligible phases, single-replica skips, and runtime failures that should still requeue.

Read standby passwords only from replica pgpass files and stop falling back to pod environment variables.

Exclude the leader pod as a password source so the repair uses replicas as the source of truth when correcting the leader-side standby role password.

Treat missing pgpass files and pgpass files without a standby entry as unavailable password sources. Record StandbyPasswordUnavailable without requeueing for those non-transient states, while keeping delayed requeue behavior for real exec/runtime failures.

Allow the repair transformer to run while the PostgreSQL component is Running, Updating, or Abnormal, and skip components that have no replica password source.

Add focused tests for replica-only password sourcing, unavailable pgpass handling, non-running eligible phases, single-replica skips, and runtime failures that should still requeue.
@im0x0ing im0x0ing force-pushed the fix-standby-password-repair-requeue branch from 15d8edb to fc362bb Compare June 17, 2026 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant