Re: Our naming of wait events is a disaster.

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Our naming of wait events is a disaster.
Date: 2020-05-12 21:32:45
Message-ID: CANP8+j+JGMKcEC4DkHHsqXoXD2xvN3gGqhJcy3X-TQBg9+wzZw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 12 May 2020 at 21:00, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Simon Riggs <simon(at)2ndquadrant(dot)com> writes:
> > On Tue, 12 May 2020 at 19:11, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> Anyway, I was just throwing this idea out to see if there would be
> >> howls of "you can't rename anything" anguish. Since there haven't
> >> been so far, I'll spend a bit more time and try to create a concrete
> >> list of possible changes.
>
> > If we add in extensions and lwlocks, will they show up as well?
>
> Yeah, I was just looking into that. Part of the reason for the
> inconsistency is that we've exposed names that are passed to,
> eg, SimpleLruInit that previously were strictly internal debugging
> identifiers, so that approximately zero thought was put into them.
>
> We're going to have to document SimpleLruInit and similar functions
> along the lines of "The name you give here will be user-visible as
> a wait event. Choose it with an eye to consistency with existing
> wait event names, and add it to the user-facing documentation."
> But that requirement isn't something I just invented, it was
> effectively created by whoever implemented things this way.
>
> Said user-facing documentation largely fails to explain that the
> set of wait events can be enlarged by extensions; that needs to
> be fixed, too.
>
> There isn't a lot we can do to force extensions to pick consistent
> names, but on the other hand we won't be documenting such names
> anyway, so for my immediate purposes it doesn't matter ;-)
>

I think we need to plan the namespace with extensions in mind.

There are now dozens; some of them even help you view wait events...

We don't want the equivalent of the Dewey decimal system: 300 categories of
Exaggeration and one small corner for Science.

--
Simon Riggs http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/>
Mission Critical Databases

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-05-12 22:11:08 Re: Our naming of wait events is a disaster.
Previous Message Tom Lane 2020-05-12 21:17:09 Re: Our naming of wait events is a disaster.