Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jYhXw-0001hE-Tl for pgsql-hackers@arkaria.postgresql.org; Wed, 13 May 2020 02:55:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jYhXt-0007LK-Ug for pgsql-hackers@arkaria.postgresql.org; Wed, 13 May 2020 02:54:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jYhXt-0007LD-Nn for pgsql-hackers@lists.postgresql.org; Wed, 13 May 2020 02:54:57 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jYhXm-0006aH-RL for pgsql-hackers@lists.postgresql.org; Wed, 13 May 2020 02:54:56 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 04D2smEk005599; Tue, 12 May 2020 22:54:48 -0400 From: Tom Lane To: Isaac Morland cc: Alvaro Herrera , Robert Haas , PostgreSQL Hackers Subject: Re: Our naming of wait events is a disaster. In-reply-to: References: <20200512202726.GA31125@alvherre.pgsql> <9871.1589321468@sss.pgh.pa.us> Comments: In-reply-to Isaac Morland message dated "Tue, 12 May 2020 21:16:40 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <5597.1589338488.1@sss.pgh.pa.us> Date: Tue, 12 May 2020 22:54:48 -0400 Message-ID: <5598.1589338488@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Isaac Morland writes: > ... I'm wondering because it seems > like it might be helpful to have a system view which gives all the wait > event types, names, and descriptions. Maybe even add a column for which > extension (or core) it came from. The documentation could then just explain > the general situation and point people at the system view to see exactly > which wait types exist in their system. There's certainly an argument for doing things like that, but I think it'd be a net negative in terms of quality and consistency of documentation. We'd basically be deciding those are non-goals. Of course, ripping out table 27.4 altogether would be a simple solution to the formatting problem I started with ;-). But it doesn't really seem like the answer we want. > Of course if the names get passed in ad hoc then such a view could only > show the types that happen to have been created up to the moment it is > queried, which would defeat the purpose. Yes, exactly. I don't actually understand why the LWLock tranche mechanism is designed the way it is. It seems to be intended to support different backends having different sets of LWLocks, but I fail to see why that's a good idea, or even useful at all. In any case, dynamically-created LWLocks are clearly out of scope for the documentation. The problem that I'm trying to deal with right now is that even LWLocks that are hard-wired into the backend code are difficult to enumerate. That wasn't a problem before we decided we needed to expose them all to user view; but now it is. regards, tom lane