On Tue, Oct 4, 2016 at 1:55 AM, Robert Haas <robertmh...@gmail.com> wrote:
> On Mon, Oct 3, 2016 at 3:30 AM, Michael Paquier
> <michael.paqu...@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.

OK with that.

> 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.

In pgstat_get_wait_event_type you are forgetting WAIT_IPC.

+        <row>
+         <entry morerows="10"><literal>IPC</></entry>
+         <entry><literal>BgWorkerShutdown</></entry>
+         <entry>Waiting for background worker to shut down.</entry>
+        </row>
Here this should be morerows=9. You removed two entries, and added one
with SafeSnapshot.

The rest looks good to me. Thanks for the feedback and the time!
-- 
Michael

Attachment: wait-event-v14.patch
Description: application/download

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to