Skip to content
Discussion options

You must be logged in to vote

It's not officially required or documented by CloudNativePG, but in low-activity environments, manually triggering a WAL switch with SELECT pg_switch_wal(); before or after a backup is a safe and effective way to ensure all WALs up to the backup are archived and available for PITR. This is a common workaround in the PostgreSQL community when archive_timeout alone isn't enough due to minimal write activity. There are no known downsides or CloudNativePG-specific caveats to this approach, and it aligns with best practices for reliable restores in these scenarios. In high-activity environments, or when archive_timeout reliably triggers, this step is usually unnecessary.

To reply, just mention

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@troll-os
Comment options

@troll-os
Comment options

@troll-os
Comment options

@dosubot
Comment options

Answer selected by troll-os
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant