cloudnative-pg / cloudnative-pg/charts

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

Open
#846 3 comments 2 reactions 0 assignees View on GitHub
chart( cluster )
Dominant language
Go Template
Stars
621
Forks
265
Avg merge
7d 12h
Merged PRs (30d)
7

Description

This request comes as an output of this issue: https://github.com/cloudnative-pg/cloudnative-pg/issues/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: https://github.com/cloudnative-pg/charts/pull/847

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.