From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Tracking wait event for latches |
Date: | 2016-10-04 00:43:16 |
Message-ID: | CAB7nPqQ6x1SeiOejjsUxj8unCA1jWoxuqxPceYB-TjoNh3h--w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Oct 4, 2016 at 1:55 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Mon, Oct 3, 2016 at 3:30 AM, Michael Paquier
> <michael(dot)paquier(at)gmail(dot)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 | Content-Type | Size |
---|---|---|
wait-event-v14.patch | application/x-download | 43.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2016-10-04 01:47:23 | Re: Transactions involving multiple postgres foreign servers |
Previous Message | Michael Paquier | 2016-10-03 23:57:52 | Re: pageinspect: Hash index support |