How do I actually run pg_resetwal on my crashed Postgres?
lubobali
PROOP

2 months ago

 Hi,

  My Postgres has been down for 24 hours with WAL corruption. You guys said I can run pg_resetwal to fix it, but I literally can't find a way to do it.

  I tried:

  - railway CLI (no exec access to the container)

  - Pre-deploy command (can't find pg_resetwal command)

  - Custom start command (same error - command not found)

  Can you please just tell me the EXACT steps to run this command inside my Postgres container?

  Or can you run it for me?

  IMPORTANT: I don't need the data from the last day (2026-01-23). If you have backups from before that, just restore from 2026-01-22 or earlier. I'm fine losing the last file upload that caused the crash.

  Database: yamabiko.proxy.rlwy.net:20282

  Service: Postgres (production)

  Project: extraordinary-enthusiasm

  I'm on the Pro plan ($20/month). Database has been down since yesterday. Need help ASAP.

  Thanks

$10 Bounty

1 Replies

Railway
BOT

2 months ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open Railway about 2 months ago


Set the custom start command in the postgres service to be sleep infinity , SSH into the container, then run the pg_resetwal command.


Loading...