`rake posts:rebake` crashed half way through

Hi!

It sounds like your Postgres state on disk is bad, either due to a specific corruption event or to an ongoing problem, like filesystem corruption or underlying disk/memory hardware faults in your VPS.

For starters you should try fsck on your filesystem.

Next, If it’s a testbed and you can rebuild the data, try starting over from scratch with PG by completely removing its data directory and creating a fresh DB. Then try stressing things by importing/rebaking again to see if the problem persists.