I'm not entirely happy with the name "nextClearXidElem" but apart from that I'm fairly happy with this version. We should probably test it to make sure I haven't broken anything;
I have verified the patch and it is fine. I have tested it via manual
tests; for long pgbench tests, results are quite similar to previous