Re: [PATCHES] LWLock statistics collector - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCHES] LWLock statistics collector
Date
Msg-id 20964.1154626375@sss.pgh.pa.us
Whole thread Raw
In response to Re: CSStorm occurred again by postgreSQL8.2. (Re: poor performance with Context Switch Storm at TPC-W.)  (Katsuhiko Okano <okano.katsuhiko@oss.ntt.co.jp>)
Responses Re: [PATCHES] LWLock statistics collector
Re: LWLock statistics collector
List pgsql-hackers
ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp> writes:
> Here is a patch to collect statistics of LWLocks.

This seems fairly invasive, as well as confused about whether it's an
#ifdef'able thing or not.  You can't have system views and pg_proc
entries conditional on a compile-time #ifdef, so in a default build
we would have a lot of nonfunctional cruft exposed to users.

Do we really need this compared to the simplistic dump-to-stderr
counting support that's in there now?  That stuff doesn't leave any
cruft behind when not enabled, and it has at least one significant
advantage over your proposal, which is that it's possible to get
per-process statistics when needed.

If I thought that average users would have a need for LWLock statistics,
I'd be more sympathetic to expending effort on a nice frontend for
viewing the statistics, but this is and always will be just a concern
for hardcore hackers ...

            regards, tom lane

pgsql-hackers by date:

Previous
From: "korryd@enterprisedb.com"
Date:
Subject: Re: pg_terminate_backend
Next
From: Tom Lane
Date:
Subject: Re: [PATCHES] WIP archive_timeout patch