Re: Slow standby snapshot

From: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
To: Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Michail Nikolaev <michail(dot)nikolaev(at)gmail(dot)com>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, reshkekirill <reshkekirill(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Slow standby snapshot
Date: 2022-08-02 11:32:39
Message-ID: F6FA8064-9681-41FC-9E9E-FB9337AE982F@yandex-team.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 29 Jul 2022, at 20:08, Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message houzj.fnst@fujitsu.com 2022-08-02 11:46:21 RE: Perform streaming logical transactions by background workers and parallel apply
Previous Message Junwang Zhao 2022-08-02 11:27:30 [PATCH] Add a inline function to eliminate duplicate code