A question from Telegram chat: how to organize a transaction ID wraparound armageddon (of course, not in production), for educational purposes?
Created some straightforward recipe: t.me/postgreschat/1 β they say it works.
Could be a basis to train DBA's rescue activities?
Conversation
Replying to
Or just use pg_resetwal to shift the next one forward to skip past most of it? Unless you actually need the xids to be in use for something?
1
4
IMV we need a testing tool that simply burns through XIDs very quickly. I am wary of trusting "pg_resetwal -x" to simulate wraparound conditions - better to (almost) do wraparound for real. Greenplum takes this approach:
3
1
6
How about an initdb option to start XIDs near the wrap-around point? IIRC the Linux kernel did that for the jiffies counter to flush out bugs quicker.
3
There's nothing wrong with that idea, but I'd have more confidence in an approach that is mechanistically closer to real world conditions. It's not like it takes that long to burn ~2 billion XIDs, if you actually set out to do so. IIRC less than 5 minutes.



