Re: Slow standby snapshot - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Slow standby snapshot
Date
Msg-id CANbhV-EoE6oaav89rvSXJcFa-tiRQtUEj3eTs2RHVEchrSxZ3Q@mail.gmail.com
Whole thread Raw
In response to Re: Slow standby snapshot  (Michail Nikolaev <michail.nikolaev@gmail.com>)
List pgsql-hackers
On Fri, 29 Jul 2022 at 18:24, Michail Nikolaev
<michail.nikolaev@gmail.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.
>
> Nice, I'll do performance testing for both versions and master branch
> as baseline.

The objective of all patches is to touch the smallest number of
cachelines when accessing the KnownAssignedXacts array.

The trade-off is to keep the array small with the minimum number of
compressions, so that normal snapshots don't feel the contention and
so that the Startup process doesn't slow down because of the extra
compression work. The values I've chosen in the recent patch are just
guesses at what we'll need to reduce it to, so there may be some
benefit in varying those numbers to see the effects.

It did also occur to me that we might need a separate process to
perform the compressions, which we might be able to give to WALWriter.

-- 
Simon Riggs                http://www.EnterpriseDB.com/



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Allow file inclusion in pg_hba and pg_ident files
Next
From: David Rowley
Date:
Subject: Re: POC: GROUP BY optimization