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