Skip to content

[Feature Request] Expose backups.target option so users may choose to backup from the primary instance #846

@cloudymax

Description

@cloudymax

This request comes as an output of this issue: cloudnative-pg/cloudnative-pg#10416

When taking on-demand-backups, a user will not be able to successfully recover from that backup unless:

  1. Another INSERT command is run to for a sync of the WAL on a standby replica
  2. A SUPERUSER calls SELECT pg_switch_wal(); on the primary replica to force the creation of a new WAL file.
  3. The backup.target is set to primary

While probably not an issue for very busy databases, this caught me out on some DBs that have very infrequent usage.

Exposing backup.target is preferable from a security perspective because the user does not need to access and account with the SUPERUSER roll. It also is operationally less complex than creating an automated task to run an INSERT or SELECT pg_switch_wal(); after each backup.

PR here: #847

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions