Skip to content

"cnpg status" reports WAL archiving in "Starting up" on a replica cluster #1604

Closed

Description

@gbartolini

I set up a replica cluster that is replicating via just object store from another cluster and is archiving to a local S3 bucket. WAL archiving is fine, including querying the pg_stat_archiver view, but the status command of the cnpg plugin reports:

Continuous Backup status
First Point of Recoverability:  2023-02-28T18:03:54Z
Working WAL archiving:          Starting Up
WALs waiting to be archived:    0
Last Archived WAL:              -
Last Failed WAL:                -

Activity

  1. added
    bug 🐛
    on Mar 1, 2023
  2. gbartolini commented on Mar 1, 2023

    @gbartolini
    ContributorAuthor

    The issue is in the fillStatusFromPrimary method in pkg/management/postgres/probes.go, specifically when we call:

    • pg_current_wal_lsn() - not available on a standby
    • pg_walfile_name() - ditto (even though I am trying to understand if this is a bug or not in Postgres)

    pg_current_wal_lsn() can be replaced on a standby by pg_last_wal_replay_lsn().

  3. self-assigned this
    on Mar 5, 2023
  4. added a commit that references this issue on Mar 17, 2023
    1b22c32
  5. added a commit that references this issue on Mar 17, 2023
    ab8febe
  6. added 2 commits that reference this issue on Mar 17, 2023
    51cf13e
  7. added a commit that references this issue on Mar 17, 2023
    37b13b6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug 🐛

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions