generated from cloudnative-pg/cnpg-template
-
Notifications
You must be signed in to change notification settings - Fork 48
feat: remove wal from cache after archiving #659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80edf33 to
1e6068b
Compare
Signed-off-by: Marco Nenciarini <[email protected]>
1e6068b to
5a68e1e
Compare
armru
previously approved these changes
Dec 2, 2025
Signed-off-by: Leonardo Cecchi <[email protected]>
leonardoce
approved these changes
Dec 3, 2025
renovate bot
added a commit
to sdwilsh/ansible-playbooks
that referenced
this pull request
Jan 8, 2026
…v0.10.0 ##### [\`v0.10.0\`](https://github.com/cloudnative-pg/plugin-barman-cloud/releases/tag/v0.10.0) ##### Features - Add `pprof-server` support ([#538](cloudnative-pg/plugin-barman-cloud#538)) ([921b20c](cloudnative-pg/plugin-barman-cloud@921b20c)), closes [#421](cloudnative-pg/plugin-barman-cloud#421) - Remove wal from cache after archiving ([#659](cloudnative-pg/plugin-barman-cloud#659)) ([df22bf2](cloudnative-pg/plugin-barman-cloud@df22bf2)) ##### Bug Fixes - **deps:** Update all non-major go dependencies ([#685](cloudnative-pg/plugin-barman-cloud#685)) ([df2f91d](cloudnative-pg/plugin-barman-cloud@df2f91d)) - **deps:** Update all non-major go dependencies ([#701](cloudnative-pg/plugin-barman-cloud#701)) ([db96dcc](cloudnative-pg/plugin-barman-cloud@db96dcc)) - **deps:** Update k8s.io/utils digest to [`383b50a`](cloudnative-pg/plugin-barman-cloud@383b50a) ([#695](cloudnative-pg/plugin-barman-cloud#695)) ([95ef5dc](cloudnative-pg/plugin-barman-cloud@95ef5dc)) - **deps:** Update k8s.io/utils digest to [`9d40a56`](cloudnative-pg/plugin-barman-cloud@9d40a56) ([#684](cloudnative-pg/plugin-barman-cloud#684)) ([0ea3d91](cloudnative-pg/plugin-barman-cloud@0ea3d91)) - **deps:** Update kubernetes packages to v0.35.0 ([#694](cloudnative-pg/plugin-barman-cloud#694)) ([30dbc44](cloudnative-pg/plugin-barman-cloud@30dbc44)) - **deps:** Update module google.golang.org/grpc to v1.78.0 ([#697](cloudnative-pg/plugin-barman-cloud#697)) ([3f8d4f7](cloudnative-pg/plugin-barman-cloud@3f8d4f7)) - **deps:** Update module sigs.k8s.io/kustomize/api to v0.21.0 ([#651](cloudnative-pg/plugin-barman-cloud#651)) ([ef19031](cloudnative-pg/plugin-barman-cloud@ef19031)) - Don't log full environment variables at default log level ([#589](cloudnative-pg/plugin-barman-cloud#589)) ([a487c4e](cloudnative-pg/plugin-barman-cloud@a487c4e)) - **targetTime:** Treat RFC3339-like timestamps without timezone as UTC ([#700](cloudnative-pg/plugin-barman-cloud#700)) ([1f1d300](cloudnative-pg/plugin-barman-cloud@1f1d300)), closes [#699](cloudnative-pg/plugin-barman-cloud#699)
sdwilsh
pushed a commit
to sdwilsh/ansible-playbooks
that referenced
this pull request
Jan 8, 2026
…v0.10.0 ##### [\`v0.10.0\`](https://github.com/cloudnative-pg/plugin-barman-cloud/releases/tag/v0.10.0) ##### Features - Add `pprof-server` support ([#538](cloudnative-pg/plugin-barman-cloud#538)) ([921b20c](cloudnative-pg/plugin-barman-cloud@921b20c)), closes [#421](cloudnative-pg/plugin-barman-cloud#421) - Remove wal from cache after archiving ([#659](cloudnative-pg/plugin-barman-cloud#659)) ([df22bf2](cloudnative-pg/plugin-barman-cloud@df22bf2)) ##### Bug Fixes - **deps:** Update all non-major go dependencies ([#685](cloudnative-pg/plugin-barman-cloud#685)) ([df2f91d](cloudnative-pg/plugin-barman-cloud@df2f91d)) - **deps:** Update all non-major go dependencies ([#701](cloudnative-pg/plugin-barman-cloud#701)) ([db96dcc](cloudnative-pg/plugin-barman-cloud@db96dcc)) - **deps:** Update k8s.io/utils digest to [`383b50a`](cloudnative-pg/plugin-barman-cloud@383b50a) ([#695](cloudnative-pg/plugin-barman-cloud#695)) ([95ef5dc](cloudnative-pg/plugin-barman-cloud@95ef5dc)) - **deps:** Update k8s.io/utils digest to [`9d40a56`](cloudnative-pg/plugin-barman-cloud@9d40a56) ([#684](cloudnative-pg/plugin-barman-cloud#684)) ([0ea3d91](cloudnative-pg/plugin-barman-cloud@0ea3d91)) - **deps:** Update kubernetes packages to v0.35.0 ([#694](cloudnative-pg/plugin-barman-cloud#694)) ([30dbc44](cloudnative-pg/plugin-barman-cloud@30dbc44)) - **deps:** Update module google.golang.org/grpc to v1.78.0 ([#697](cloudnative-pg/plugin-barman-cloud#697)) ([3f8d4f7](cloudnative-pg/plugin-barman-cloud@3f8d4f7)) - **deps:** Update module sigs.k8s.io/kustomize/api to v0.21.0 ([#651](cloudnative-pg/plugin-barman-cloud#651)) ([ef19031](cloudnative-pg/plugin-barman-cloud@ef19031)) - Don't log full environment variables at default log level ([#589](cloudnative-pg/plugin-barman-cloud#589)) ([a487c4e](cloudnative-pg/plugin-barman-cloud@a487c4e)) - **targetTime:** Treat RFC3339-like timestamps without timezone as UTC ([#700](cloudnative-pg/plugin-barman-cloud#700)) ([1f1d300](cloudnative-pg/plugin-barman-cloud@1f1d300)), closes [#699](cloudnative-pg/plugin-barman-cloud#699)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes the memory leak in the plugin-barman-cloud container where memory usage continuously increases on primary instances during WAL archiving.
Motivation
The plugin-barman-cloud container on primary instances was experiencing ever-increasing memory usage due to archived WAL files accumulating in the OS page cache. In Kubernetes environments running on large machines, memory pressure is typically insufficient to naturally evict these cached files, causing them to waste memory that could be used for active workloads.
Changes
After successfully archiving a WAL file, the plugin now explicitly drops it from the OS page cache using
fadvise(FADV_DONTNEED). This prevents archived WALs from accumulating in memory and causing the observed memory leak.Dependencies
This PR depends on cloudnative-pg/barman-cloud#169
Closes #385