Re: huge SubtransSLRU and SubtransBuffer wait_event

From: Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: huge SubtransSLRU and SubtransBuffer wait_event
Date: 2024-02-02 10:04:02
Message-ID: CANNMO++EdBcR7yHMp4hsYO3NcyKwj_VFy4jzuqA0AGeCfn2XjA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Thu, Feb 1, 2024 at 04:42 Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:

> Today, the only feasible solution is not to create more than 64
> subtransactions
> (savepoints or PL/pgSQL EXCEPTION clauses) per transaction.

Sometimes, a single subtransaction is enough to experience a bad
SubtransSLRU spike:
https://postgres.ai/blog/20210831-postgresql-subtransactions-considered-harmful#problem-4-subtrans-slru-overflow

I think 64+ nesting level is quite rare, but this kind of problem that hits
you when you have high XID growth (lots of writes) + long-running
transaction is quite easy to bump into. Or this case involving
MultiXactIDs:
https://buttondown.email/nelhage/archive/notes-on-some-postgresql-implementation-details/

Nik

>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Laurenz Albe 2024-02-02 10:31:19 Re: huge SubtransSLRU and SubtransBuffer wait_event
Previous Message Lars Aksel Opsahl 2024-02-02 09:26:49 Re: huge SubtransSLRU and SubtransBuffer wait_event