RE: huge SubtransSLRU and SubtransBuffer wait_event

2024-02-05 Thread James Pang (chaolpan)
parallel sessions count doing same query at the same time help a lot. Thanks all. James From: Nikolay Samokhvalov Sent: Friday, February 2, 2024 6:04 PM To: Laurenz Albe ; pgsql-performance@lists.postgresql.org Subject: Re: huge SubtransSLRU and SubtransBuffer wait_event On Thu, Feb 1

Re: huge SubtransSLRU and SubtransBuffer wait_event

2024-02-02 Thread Laurenz Albe
On Fri, 2024-02-02 at 02:04 -0800, Nikolay Samokhvalov wrote: > On Thu, Feb 1, 2024 at 04:42 Laurenz Albe wrote: > > Today, the only feasible solution is not to create more than 64 > > subtransactions > > (savepoints or PL/pgSQL EXCEPTION clauses) per transaction. > > I think 64+ nesting level i

Re: huge SubtransSLRU and SubtransBuffer wait_event

2024-02-02 Thread Nikolay Samokhvalov
On Thu, Feb 1, 2024 at 04:42 Laurenz Albe 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://postgre

Re: huge SubtransSLRU and SubtransBuffer wait_event

2024-02-02 Thread Lars Aksel Opsahl
>From: James Pang (chaolpan) Sent: Friday, February 2, 2024 >7:47 AMTo: Laurenz Albe ; >pgsql-performance@lists.postgresql.org >Subject: RE: huge SubtransSLRU and >SubtransBuffer wait_event > > Our case is 1) we use PL/PGSQL procedure1-->procedure2 (update ta

Re: huge SubtransSLRU and SubtransBuffer wait_event

2024-02-02 Thread Alvaro Herrera
On 2024-Feb-02, James Pang (chaolpan) wrote: > Possible to increase Subtrans SLRU buffer size ? Not at present -- you need to recompile after changing NUM_SUBTRANS_BUFFERS in src/include/access/subtrans.h, NUM_MULTIXACTOFFSET_BUFFERS and NUM_MULTIXACTMEMBER_BUFFERS in src/include/access/multix

RE: huge SubtransSLRU and SubtransBuffer wait_event

2024-02-01 Thread James Pang (chaolpan)
Sent: Thursday, February 1, 2024 11:34 PM To: Laurenz Albe ; pgsql-performance@lists.postgresql.org Subject: RE: huge SubtransSLRU and SubtransBuffer wait_event Today, the only feasible solution is not to create more than 64 subtransactions (savepoints or PL/pgSQL EXCEPTION clauses) per transacti

RE: huge SubtransSLRU and SubtransBuffer wait_event

2024-02-01 Thread James Pang (chaolpan)
l.org Subject: Re: huge SubtransSLRU and SubtransBuffer wait_event On Thu, 2024-02-01 at 11:50 +, James Pang (chaolpan) wrote: > We have a Postgresqlv14.8 server, client use Postgresql JDBC > connections, today, our server see a lot of  “SubtransBuffer” and > “SubtransSLRU” wait_even

Re: huge SubtransSLRU and SubtransBuffer wait_event

2024-02-01 Thread Laurenz Albe
On Thu, 2024-02-01 at 11:50 +, James Pang (chaolpan) wrote: > We have a Postgresqlv14.8 server, client use Postgresql JDBC connections, > today, > our server see a lot of  “SubtransBuffer” and “SubtransSLRU” wait_event. > Could you help direct me what’s the possible cause and how to resolve th