> On 29 Jul 2022, at 20:08, Simon Riggs <simon.riggs@enterprisedb.com> wrote:
>
> A simple patch like this seems to hit the main concern, aiming to keep
> the array from spreading out and impacting snapshot performance for
> SELECTs, yet not doing it so often that the startup process has a
> higher burden of work.
The idea to compress more often seem viable. But this might make some other workloads pathological.
Some KnownAssignedXids routines now can become quadratic in case of lots of subtransactions.
KnownAssignedXidsRemoveTree() only compress with probability 1/8, but it is still O(N*N).
IMO original patch (with next pointer) is much safer in terms of unexpected performance degradation.
Thanks!
Best regards, Andrey Borodin.