Skip to content
Production PostgreSQL crashed – disk full, need database recovery
ranjithkumarmummadi-arch
OP

19 days ago

Hello Railway Support,

My production PostgreSQL service keeps crashing because its attached volume appears to be full.

Error from deployment logs:

FATAL: could not write to file "pg_wal/xlogtemp.63": No space left on device

The logs also show:

PostgreSQL Database directory appears to contain a database; Skipping initialization.

My PostgreSQL service has an attached volume named postgres-volume. The Backups tab shows no backups.

I need to recover my existing production database and preserve all existing data.

Could you please help me:

  1. Determine whether the existing database data is recoverable.
  2. Safely increase the existing volume storage, if possible.
  3. Recover PostgreSQL without wiping, deleting, or replacing the existing volume.

Please provide safe recovery instructions before I perform any potentially destructive operation.

Thank you.

Solved

1 Reply

Railway
BOT

19 days ago

Your postgres-volume is still attached to the Postgres service with about 479 MB written on a 500 MB volume, so the existing data is still on the volume. The crash is Postgres running out of room to write new log files, not data being wiped. The "Skipping initialization" line means Postgres found your existing database and did not create a new one.

500 MB is the largest volume the Trial plan allows, so this volume can't be resized on your current plan. Volumes can be resized on paid plans (Hobby allows up to 5 GB, Pro up to 50 GB by default), and resizing expands the existing volume in place with your data kept. You resize it from the volume's settings with Live Resize. When a volume is completely full, the resize is done offline with data integrity checks, which restarts the service briefly. Once there is free space, Postgres can start on the same data directory without anything being deleted or replaced. See the volume docs.

Volume backups are only available on Pro, which is why the Backups tab is empty. Once Postgres is running again, we recommend taking a pg_dump before any other changes.


Status changed to Awaiting User Response Railway • 19 days ago


Railway
BOT

12 days ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway • 12 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...