Re: Tracking wait event for latches

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(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-09-26 06:07:48
Message-ID: CAB7nPqS66MuJxAsFRQ3ES0CDDuRTJN3AYSzbgeQppcvSjSpiMQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 26, 2016 at 1:46 PM, Thomas Munro
<thomas(dot)munro(at)enterprisedb(dot)com> wrote:
> If the class really is strictly implied by the WaitEventIdentifier,
> then do we really need to supply it everywhere when calling the
> various wait functions? That's going to be quite a few functions:
> WaitLatch, WaitLatchOrSocket, WaitEventSetWait for now, and if some
> more patches out there have legs then also ConditionVariableWait,
> BarrierWait, and possibly further kinds of wait points. And then all
> their call sites will have have to supply the wait class ID, even
> though it is implied by the other ID. Perhaps that array that
> currently holds the names should instead hold { classId, displayName }
> so we could just look it up?

I considered this reverse-engineering, but arrived at the conclusion
that having a flexible API mattered more to give more flexibility to
module developers. In short this avoids having extra class IDs like
ActivityExtention, TimeoutExtension, etc. But perhaps that's just a
matter of taste..
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavan Deolasee 2016-09-26 06:36:07 Re: Refactoring of heapam code.
Previous Message Michael Paquier 2016-09-26 06:02:30 Re: Password identifiers, protocol aging and SCRAM protocol