pg_stat_lwlock wait time view - Mailing list pgsql-hackers

From Haribabu Kommi
Subject pg_stat_lwlock wait time view
Date
Msg-id CAJrrPGfhPMdT+_5LfqqwG3gupNMMzP1Uubt=qRroQgnr_T4nFg@mail.gmail.com
Whole thread Raw
Responses Re: pg_stat_lwlock wait time view  (Robert Haas <robertmhaas@gmail.com>)
Re: pg_stat_lwlock wait time view  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
List pgsql-hackers
There was some discussion earlier in adding pg_stat_lwlock view in [1].
The main objections which I observed for that patch was showing LWLOCK
information to the user that don't understand what this lock used for and etc.

Currently as part of wait_event information in pg_stat_activity the LWLOCK
information is available to the user and the details of LWLOCk's that are
used in PostgreSQL are also listed in the documentation and with their
purpose.

So I feel it may be worth to add this view to find out the wait times of the
LWLOCK's. This information can be useful to find out the bottlenecks
around LWLOCK's in production environments. But adding the timing calculations
may cause performance problem. Is there any need of writing this stats
information to file? As this just provides the wait time information.

Based on the performance impact with the additional timing calculations,
we can decide the view default behavior, Are there any objections to the
concept?


[1] - https://www.postgresql.org/message-id/4FE9A6F5.2080405@uptime.jp

Regards,
Hari Babu
Fujitsu Australia



pgsql-hackers by date:

Previous
From: Haribabu Kommi
Date:
Subject: Re: New SQL counter statistics view (pg_stat_sql)
Next
From: Etsuro Fujita
Date:
Subject: Re: postgres_fdw : altering foreign table not invalidating prepare statement execution plan.