We finally identified the cause, a pl/pgsql procedure proc1 (for 1…5000 loop call proc2()); proc2 (begin ..exception..end); at the same time, more than 200 sessions coming in milliseconds and do same query during the “call proc1 long
running transaction”. The code change and cutdown the parallel sessions count doing same query at the same time help a lot.
Thanks all. James From: Nikolay Samokhvalov <samokhvalov@xxxxxxxxx> On Thu, Feb 1, 2024 at 04:42 Laurenz Albe <laurenz.albe@xxxxxxxxxxx> wrote:
Sometimes, a single subtransaction is enough to experience a bad SubtransSLRU spike: 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: Nik |