Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qWSCH-003JFO-Jz for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Aug 2023 01:53:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qWSCG-00Bk2q-7D for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Aug 2023 01:53:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qWSCF-00Bk2Z-TF for pgsql-hackers@lists.postgresql.org; Thu, 17 Aug 2023 01:53:12 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qWSCC-000Zxj-Ck for pgsql-hackers@lists.postgresql.org; Thu, 17 Aug 2023 01:53:11 +0000 Received: from oss.nttdata.com (localhost [127.0.0.1]) by oss.nttdata.com (Postfix) with ESMTPA id 70A70612A1; Thu, 17 Aug 2023 10:53:02 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.8 at oss.nttdata.com MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Thu, 17 Aug 2023 10:53:02 +0900 From: Masahiro Ikeda To: "Drouvot, Bertrand" Cc: Michael Paquier , Kyotaro Horiguchi , tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org Subject: Re: WIP: new system catalog pg_wait_event In-Reply-To: References: <0109438a-9672-322b-7638-04ad47c97d0f@gmail.com> <1dc98591-0d06-f0da-bc88-21f529d6fb8e@gmail.com> <20230808.115332.301701413576096139.horikyota.ntt@gmail.com> <2f84b397-d020-493c-924c-610b9dd18f8d@gmail.com> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <735fbd560ae914c96faaa23cc8d9a118@oss.nttdata.com> X-Sender: ikedamsh@oss.nttdata.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, Thank you for creating the patch! I think it is a very useful view as a user. I will share some thoughts about the v6 patch. 1) The regular expression needs to be changed in generate-wait_event_types.pl. I have compared the documentation with the output of the pg_wait_event view and found the following differences. * For parameter names, the substitution for underscore is missing. -ArchiveCleanupCommand Waiting for archive_cleanup_command to complete -ArchiveCommand Waiting for archive_command to complete +ArchiveCleanupCommand Waiting for archive-cleanup-command to complete +ArchiveCommand Waiting for archive-command to complete -RecoveryEndCommand Waiting for recovery_end_command to complete +RecoveryEndCommand Waiting for recovery-end-command to complete -RestoreCommand Waiting for restore_command to complete +RestoreCommand Waiting for restore-command to complete * The HTML tag match is not shortest match. -frozenid Waiting to update pg_database.datfrozenxid and pg_database.datminmxid +frozenid Waiting to update datminmxid * There are two blanks before "about". Also " for heavy weight is removed (is it intended?) -LockManager Waiting to read or update information about "heavyweight" locks +LockManager Waiting to read or update information about heavyweight locks * Do we need "worker_spi_main" in the description? The name column shows the same one, so it could be omitted. > pg_wait_event > worker_spi_main Custom wait event "worker_spi_main" defined by > extension 2) Would it be better to add "extension" meaning unassigned? > Extensions can add Extension and LWLock types to the list shown in > Table 28.8 and Table 28.12. In some cases, the name of LWLock assigned > by an extension will not be available in all server processes; It might > be reported as just “extension” rather than the extension-assigned > name. 3) Would index == els be better for the following Assert? + Assert(index <= els); 4) There is a typo. alll -> all + /* Allocate enough space for alll entries */ 5) BTW, although I think this is outside the scope of this patch, it might be a good idea to be able to add a description to the API for custom wait events. Regards, -- Masahiro Ikeda NTT DATA CORPORATION