Skip to content

Disable backups or provide a way to limit uncontrolled growth of wal directory #2813

@pietrobaricco

Description

@pietrobaricco

Overview

I have a devlopment cluster which crashed because the disk got filled by wal files

Use Case

Development environments, where data can be rapidly restored from a dump and is not important anyway, don't need a backup system at all.

Desired Behavior

  • being able to disable pgbackrest or whatever is causing this uncontrolled growth of the wal directory.
  • having some clear instructions on how to recover from such situations, clearing the wal files for good.

Environment

Tell us about your environment:

Please provide the following details:

  • Platform: Kubernetes
  • Platform Version: 5.0.3
  • PGO Image Tag: ubi8-5.0.3-0
  • Postgres Version 13
  • Storage: native pvc
  • Number of Postgres clusters: 1

Edit: postgres logs are full of lines like this

ERROR: [099]: raised from remote-0 protocol on 'spadapgo-repo-host-0.spadapgo-pods.default.svc.cluster.local.': expected '{' at 'BRBLOCK-1' 2021-10-26 15:31:01.121 UTC [128] LOG: archive command failed with exit code 99 2021-10-26 15:31:01.121 UTC [128] DETAIL: The failed archive command was: pgbackrest --stanza=db archive-push "pg_wal/00000002000000070000003B"
Tried to run the command manually from the database container, and it did not produce errors, but the file is still there

in the end, I cleared the folder with pg_archivecleanup and the server resumed.
Maybe it's worth mentioning that the issue manifested itself since I enabled a cron job which refreshes ~20 materialized views from fdw tables every 30 minutes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions