[MASSMAIL]LWlock:LockManager waits - Mailing list pgsql-performance

From James Pang
Subject [MASSMAIL]LWlock:LockManager waits
Date
Msg-id CAHgTRff6-WVufuuO9L2WhAagHKqWprQx9y6hQB+sjxiedKhz5w@mail.gmail.com
Whole thread Raw
Responses Re: LWlock:LockManager waits  (Laurenz Albe <laurenz.albe@cybertec.at>)
Re: LWlock:LockManager waits  ("Luiz Fernando G. Verona" <nandoverona@gmail.com>)
List pgsql-performance
   we found sometimes , with many sessions running same query "select ..." at the same time, saw many sessions waiting on "LockManager".  for example, pg_stat_activity show.  It's a production server, so no enable trace_lwlocks flag. could you direct me what's the possible reason and how to reduce this "lockmanager" lock?  all the sql statement are "select " ,no DML.

   time                                             wait_event           count(pid) 
2024-04-08 09:00:06.043996+00 | DataFileRead  |    42
 2024-04-08 09:00:06.043996+00 |               |    15
 2024-04-08 09:00:06.043996+00 | LockManager   |    31
 2024-04-08 09:00:06.043996+00 | BufferMapping |    46
 2024-04-08 09:00:07.114015+00 | LockManager   |    43
 2024-04-08 09:00:07.114015+00 | DataFileRead  |    28
 2024-04-08 09:00:07.114015+00 | ClientRead    |    11
 2024-04-08 09:00:07.114015+00 |               |    11

Thanks,

James

pgsql-performance by date:

Previous
From: Dave Thorn
Date:
Subject: [MASSMAIL]IN subquery, many joins, very different plans
Next
From: Laurenz Albe
Date:
Subject: Re: LWlock:LockManager waits