-
Notifications
You must be signed in to change notification settings - Fork 611
Turning backups off fills up disk with WAL logs until crash #2531
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
Comments
Other flag that might be useful to fix: "Maximum Archive Push Queue Size Option" ( As docs say:
|
@jkatz is this something you might be able to look into? |
Any news about this so far? I got the same issue, that why I have to setup pgbackrest to perform backups every 4 hours, because otherwise it WAL files eating all free space. |
For the first report, you need to have at least one repo defined. There was a validation check that was incorrect that will be fixed in an upcoming release (#2662). If archive mode / command is enabled, it's a PostgreSQL feature to retain WAL logs until they are successfully pushed to the archive. Pertaining to the second issue, If you are accumulating WAL, there may be a separate issue that you need to look into. I recommend looking at the PostgreSQL logs (in the /pgdata/.../log directory) to see if the archive push is failing, and if so what the reason is. |
As I mentioned above,
archive-push is failing because the WAL receiver was out of space. What I really want to do here is run a postgres without backups... I can't seem to find any way to run postgres-operator without the essentially infinite space of S3. |
Hi @james-callahan, |
How many years is it going to take to implement this...? |
This one can cause serious issues. |
For anyone hitting this issue, the solution that worked for us is by enabling async archive mode, correctly setting spool path and then lowering the push queue:
Once added, you'll see logs of postgres dropping WAL files and pgbackrest loop through the archive. In worst case, all WAL will be dropped and a full backup is needed, alleviating the issue with |
I am using the operator on an on premise cluster and sadly I don't have infinite disk space. How do I set |
Just dropping a quick update on this thread to note that we are currently taking a look at some upcoming plans and changes to CPK to allow allow additional flexibility around disabling backups and archiving (as requested in this issue). Therefore, I simply wanted to note that this issue is definitely on our radar, and we will be in touch with additional information, details, etc. once available. |
I'm pleased to announce that support for optional backups has been released with Crunchy Postgres for Kubernetes v5.7.0. Please see the docs for more info. If you get a chance to try it out, please let us know what you think! |
Overview
If I do not specify a backup repo (e.g. because I don't want backups), then the WAL will grow until storage is exhausted.
Eventually the database crashes with "No space left on device" and doesn't restart, logging "FATAL: could not write lock file "postmaster.pid": No space left on device"
Environment
Please provide the following details:
Steps to Reproduce
REPRO
Provide steps to get to the error condition:
EXPECTED
WAL would not be retained if there is no backup repo.
ACTUAL
WAL logs fill up disk
Additional Information
I think this could be fixed via by setting
archive_command
to/bin/true
when there are no backup repos?Alternatively, you could just make it possible for me to override
archive_mode
orarchive_command
myself. Currently they are forced to be on:postgres-operator/internal/pgbackrest/postgres.go
Lines 39 to 40 in 21905f0
The text was updated successfully, but these errors were encountered: