On Fri, Jul 24, 2015 at 1:12 PM, Ildus Kurbangaliev <
i.kurbangal...@postgrespro.ru> wrote:
>
>
> > On Jul 24, 2015, at 7:26 AM, Amit Kapila <amit.kapil...@gmail.com>
wrote:
> >
> >
> > 2.
> > +const char *
> > +pgstat_get_wait_event_name(uint8 classId, uint8 eventId)
> > {
> > ..
> > }
> >
> > I don't understand why a single WaitEventType enum is not sufficient
> > as in the patch provided by me and why we need to divide it into
> > separate structures for each kind of wait, I find that way easily
> > understandable.
>
> In current patch if somebody adds new lock or individual lwlock he just
add
> its name to the corresponding array. With WaitEventType first of all he
suppose to
> know about WaitEventType,

That anyway he has to do it either you go by defining individual arrays
or having unified WaitEventType enum for individual arrays he has to
find out that array.  Another thing is with that you can just encapsulate
this information in one byte in structure PgBackendStatus, rather than
using more number of bytes (4 bytes) and I think the function for reporting
Waitevent will be much more simplified.

I think it is better if we just implement the idea of tranche's on top of my
patch and do the other remaining work like setting of bwaiting correctly
as mentioned upthread.


With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Reply via email to