Simon Riggs <simon.ri...@enterprisedb.com> writes: > I've cleaned up the comments and used a #define for the constant. > IMHO this is ready for commit. I will add it to the next CF.
I looked at this a little. It's a simple enough patch, and if it solves the problem then I sure like it better than the previous ideas in this thread. However ... I tried to reproduce the original complaint, and failed entirely. I do see KnownAssignedXidsGetAndSetXmin eating a bit of time in the standby backends, but it's under 1% and doesn't seem to be rising over time. Perhaps we've already applied some optimization that ameliorates the problem? But I tested v13 as well as HEAD, and got the same results. regards, tom lane