Re: Slow standby snapshot - Mailing list pgsql-hackers

From Andrey Borodin
Subject Re: Slow standby snapshot
Date
Msg-id F6FA8064-9681-41FC-9E9E-FB9337AE982F@yandex-team.ru
Whole thread Raw
In response to Re: Slow standby snapshot  (Simon Riggs <simon.riggs@enterprisedb.com>)
Responses Re: Slow standby snapshot
List pgsql-hackers

> 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.


pgsql-hackers by date:

Previous
From: Junwang Zhao
Date:
Subject: [PATCH] Add a inline function to eliminate duplicate code
Next
From: "houzj.fnst@fujitsu.com"
Date:
Subject: RE: Perform streaming logical transactions by background workers and parallel apply