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 1qWVwT-003VD5-PI for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Aug 2023 05:53:10 +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 1qWVwR-00DdhL-Th for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Aug 2023 05:53:08 +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 1qWVwR-00DdhD-Jb for pgsql-hackers@lists.postgresql.org; Thu, 17 Aug 2023 05:53:07 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qWVwO-000boM-9c for pgsql-hackers@lists.postgresql.org; Thu, 17 Aug 2023 05:53:07 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-3fe8a1591c7so58790585e9.3 for ; Wed, 16 Aug 2023 22:53:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692251583; x=1692856383; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=TTRRR1NxGXUGRWEXCAA++/a3vfNa93d1TbFYPutmtEA=; b=IEyQyf+X9Z+TGgaAOLTmuYgjUERBYWM0hE5smmu4fCjLK7BEUTFgGcT2R0Fnhv6mJN 9jM8rTh21r5URAor7ofePI6AR3U3JeokxZJAtSR7g5r3D1pWnfrS96A6jsFDInIBsBHK lM+8eYLD527Q4DrCmMpMwSVH1KvUhT+jfxo9pZC8YJusPZhVSPZKTR6uSA11Ak80NNlx wYS9N+M358g+ttxZmyyU/8Rm56BzlRWEntsZy6Mkmhp/cp01o5U8UInipTKu8KDV45xW asZnAw6bZ1CZKOeHyd4sYS2Q0C2z3yT+wRKXWAmbkmHtuljhJoOG8cDnAJd+Y90l56qd eeNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692251583; x=1692856383; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=TTRRR1NxGXUGRWEXCAA++/a3vfNa93d1TbFYPutmtEA=; b=RIO+uWn3W2T4/5mWEAYk7w3Z2Xir9Anep6H/Z/CwO1z+dHCIdqhZEpW03uTF1XN9fc MhXB8gZqksUqgqvLgPrSmxyMV1h7T2TElsX27aZJrUd3aGyRORbZrY2u+kP8ydDzTSca jZZxUQvH1R6CTpsqQrMf3Gd+O9Fdw3y0pKDBz53Qr+qqwY7xkJbCsjUqng7vqBkq66le JVE5uPgXcKlqFujuWGvJkRSRVvVcl0NtE5P/e9IM9Ss1QOlMcv7Ngk6T5tKhn49Vg4Gh OQdfrif9auEhaDYOo0gfBHzVWJwnZGEvuvRHz+EaxpftomMbW33YxPyzi+tJDA3gJvkh 2+kw== X-Gm-Message-State: AOJu0Ywcch0Pqd/m7IOkO0ASceLFwUR99bWQ9IMsRnbu37/cQee+hR1n lJP24ZZdfxru3IdXgyCPymc= X-Google-Smtp-Source: AGHT+IFg6nwh5C3STc/XKkSsVHoynExCxaL6BRzEjdrLJwvUSQeWikcmn/mTBbjeaY178WoRpOvp3g== X-Received: by 2002:a1c:7414:0:b0:3fe:687a:abb8 with SMTP id p20-20020a1c7414000000b003fe687aabb8mr3086349wmc.7.1692251583038; Wed, 16 Aug 2023 22:53:03 -0700 (PDT) Received: from ?IPV6:2a01:cb11:55e:1700:bc13:eb48:995d:39bb? ([2a01:cb11:55e:1700:bc13:eb48:995d:39bb]) by smtp.gmail.com with ESMTPSA id u8-20020a05600c00c800b003fe2b081661sm1624901wmm.30.2023.08.16.22.53.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Aug 2023 22:53:02 -0700 (PDT) Message-ID: Date: Thu, 17 Aug 2023 07:53:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: WIP: new system catalog pg_wait_event Content-Language: en-US To: Masahiro Ikeda Cc: Michael Paquier , Kyotaro Horiguchi , tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org 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> <735fbd560ae914c96faaa23cc8d9a118@oss.nttdata.com> From: "Drouvot, Bertrand" In-Reply-To: <735fbd560ae914c96faaa23cc8d9a118@oss.nttdata.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 8/17/23 3:53 AM, Masahiro Ikeda wrote: > 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. > Thanks for looking at it! > 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 > Yeah, nice catch. v7 just shared up-thread replace "-" by "_" for such a case. But I'm not sure the pg_wait_event description field needs to be 100% aligned with the documentation: wouldn't be better to replace "-" by " " in such cases in pg_wait_event? > * The HTML tag match is not shortest match. > -frozenid Waiting to update pg_database.datfrozenxid and pg_database.datminmxid > +frozenid Waiting to update datminmxid > Nice catch, fixed in v7. > * There are two blanks before "about". This is coming from wait_event_names.txt, thanks for pointing out. I just submitted a patch [1] to fix that. > 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 > Not intended, fixed in v7. > * 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 > Do you mean remove the wait event name from the description in case of custom extension wait events? I'd prefer to keep it, if not the descriptions would be all the same for custom wait events. > 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. > Yeah, could make sense but I think that should be a dedicated patch for the documentation. > 3) > > Would index == els be better for the following Assert? > +    Assert(index <= els); > Agree, done in v7. > 4) > > There is a typo. alll -> all > +    /* Allocate enough space for alll entries */ > Thanks! Fixed in v7. [1]: https://www.postgresql.org/message-id/dd836027-2e9e-4df9-9fd9-7527cd1757e1%40gmail.com Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com