On Wed, Sep 28, 2016 at 9:45 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Wed, Sep 28, 2016 at 8:38 AM, Michael Paquier
> <michael.paquier@gmail.com> wrote:
>> So should I change back the patch to have only one argument for the
>> eventId, and guess classId from it?
>
> Why would you need to guess?
Incorrect wording from me perhaps? i just meant that processing needs
to know what is the classId coming for a specific eventId.
> But, yes, I think one argument is much preferable.
OK. Here is the wanted patch. I have reduced the routines of WaitLatch
& friends to use only one argument, and added what is the classId
associated with a given eventId in an array of multiple fields, giving
something like that:
+ const struct wait_event_entry WaitEventEntries[] = {
+ /* Activity */
+ {WAIT_ACTIVITY, "ArchiverMain"},
[...]
I have cleaned up as well the inclusions of pgstat.h that I added
previously. Patch is attached.
--
Michael