Re: Tracking wait event for latches - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Tracking wait event for latches
Date
Msg-id CA+TgmoZ+H9dt2VojpDhYVfykxSONqVN3Ng24D2=6J_=08qQVhA@mail.gmail.com
Whole thread Raw
In response to Re: Tracking wait event for latches  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Tracking wait event for latches  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
On Mon, Oct 3, 2016 at 3:30 AM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> [ new patch ]

I think this is unnecessarily awkward for callers; the attached
version takes a different approach which I think will be more
convenient.  The attached version also (1) moves a lot more of the
logic from latch.c/h to pgstat.c/h, which I think is more appropriate;
(2) more thoroughly separates the wait events by class; (3) renames
SecureRead/SecureWrite to ClientRead/ClientWrite (whether to also
rename the C functions is an interesting question, but not the most
pressing one IMHO), (4) creates a real wait event for GetSafeSnapshot
and removes the unnecessary and overly generic ProcSleep and
ProcSignal wait events, and (5) incorporates a bit of copy editing.

I've tested that this seems to work in basic cases, but more testing
is surely welcome.  If there are no major objections, I will commit
this version.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgbench more operators & functions
Next
From: Jeff Janes
Date:
Subject: Re: Hash Indexes