pg_stat_lwlock wait time view

From: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: pg_stat_lwlock wait time view
Date: 2016-08-24 08:23:46
Message-ID: CAJrrPGfhPMdT+_5LfqqwG3gupNMMzP1Uubt=qRroQgnr_T4nFg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2016-08-24 08:25:46 Re: postgres_fdw : altering foreign table not invalidating prepare statement execution plan.
Previous Message Haribabu Kommi 2016-08-24 08:07:54 Re: New SQL counter statistics view (pg_stat_sql)