On Mon, Jan 9, 2017 at 12:13 AM, Haribabu Kommi <kommi.harib...@gmail.com> wrote: > Whenever the Backend is waiting for an LWLock, it sends the message to > "stats collector" with PID and wait_event_info of the lock. Once the stats > collector receives the message, Adds that Backend entry to Hash table after > getting the start time. Once the Backend ends the waiting for the Lock, it > sends the signal to the "stats collector" and it gets the entry from Hash > table > and finds out the wait time and update this time to the corresponding LWLock > entry in another Hash table.
I will be extremely surprised if this doesn't have a severe negative impact on performance when LWLock contention is high (e.g. a pgbench read-only test using a scale factor that fits in the OS cache but not shared_buffers). -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers