Postgres crashed, WAL cleanup needed
maixuandai-268
FREEOP

2 days ago

Please delete old WAL files to free up space and restart Postgres.

$10 Bounty

3 Replies

Railway
BOT

2 days ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway 2 days ago


pc7316478-wq
FREE

2 days ago

Plz enter pg_wal

And pg_archiveclean


pc7316478-wq

Plz enter pg_wal And pg_archiveclean

pc7316478-wq
FREE

2 days ago

In linux terminal


changhuliu
FREE

4 hours ago

Do not manually delete the WAL files in PGDATA/pg_wal.

These contain the active WAL files for the current PostgreSQL cluster; deleting them could render the database unrecoverable.

pg_archivecleanup is primarily for the WAL archive directory, not for arbitrarily clearing active PostgreSQL pg_wal files.

If the Railway volume is full, you should first increase disk space/volume capacity to make it available for Postgres to start, rather than deleting WAL files. Railway supports volume resizing; when the volume is 100% full, offline resizing may even be necessary.

Once Postgres can start, investigate why the WAL files weren't reclaimed. Common causes include:

Replication slot stuck;

Archiving failure;

Prolonged replication/recovery time;

Checkpoint/WAL retention configuration issues.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...