SafeDisk AI

Embedded Postgres Dies On macOS Disk Pressure

When a local app or AI-agent workspace writes scheduled backups until the disk is full, embedded Postgres can die on ENOSPC and leave health checks stuck at database unreachable. The safe fix is not just more cleanup. Gate writes before backup, prune old backups first, and supervise restart with a clear failure state.

Free Mac scan

Run the free Mac scan before deleting.

The Mac scan reads storage metadata locally, then shows the largest visible buckets and the files that need an AI delete / confirm / protect judgment.

Add command output optional

Free trial step. We reply first with a delete / confirm / protect judgment or one read-only detail we still need.

Download free Mac scan See sample result Ask AI about one file

Recovery Runbook

For local apps with embedded Postgres, the recovery order should protect database state first, then reduce backup pressure, then restart the database process with bounded attempts.

  1. Check free bytes before backup writes. Skip backup if the target volume is below the configured reserve.
  2. Prune or rotate old backups before starting the next backup, not after a successful backup.
  3. Put backup temp files on the same target volume so free-space checks match where bytes are written.
  4. Supervise embedded Postgres with a bounded restart loop and a clear gave-up state.
  5. Keep app support folders, databases, credentials, transcripts, and agent state confirm-first.
Copy-ready issue reply

Use this when backups kill embedded Postgres on low disk.

This keeps the fix focused on pre-write gates and supervised recovery instead of broad cleanup after data loss.

This looks like a write-before-prune failure: the scheduled backup should prove target free space and prune old backups before opening the next backup file. Once ENOSPC kills embedded Postgres, a health probe alone is not enough; the supervisor needs a bounded restart path and an explicit gave-up state.

Read-only evidence I would capture first:

df -h "$HOME" /tmp
df -i "$HOME" /tmp
du -sh "$HOME/Library/Application Support"/* 2>/dev/null | sort -h | tail -30
find "$HOME" -maxdepth 5 -type f \( -name "*.dump" -o -name "*.backup" -o -name "*.sqlite" -o -name "*.log" \) -size +500M -print0 2>/dev/null | xargs -0 du -h 2>/dev/null | sort -hr | head -40

For the fix, I would add: min-free-gb gate before backup, aggressive prune threshold before writing, temp file on the target volume, bounded Postgres restart attempts, and a health response that distinguishes disk_pressure, restarting, and gave_up.

Do Not Delete First

Free AI deletion trial

Still full after the SafeDisk Lite scan?

Start with the SafeDisk Lite scan. If the scan still leaves unclear delete / confirm / protect decisions, send one request for the free SafeDisk AI deletion trial next step.

Download free Mac scan
Add output optional

Start with email. Output can follow after the first reply.