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:
Ah, that was not there when I tested 64 bit patches in Greenplum and PostgreSQL. I had to spin up large instances and insert plenty of data ;-)
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
Isn't that pretty much what pg_resetwal does? Which Peter is a bit wary of using... (given the criticality of this, I think it's good to have both a quick-and-dirty tool and a deeper tool like the one referenced from greenplum)




