From: Masahiro Ikeda <ikedamsh@oss.nttdata.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: Tristan Partin <tristan@neon.tech>
Cc: andres@anarazel.de
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Support to define custom wait events for extensions
Date: Mon, 31 Jul 2023 15:53:27 +0900
Message-ID: <446d286f3272437df705ee69ad0d8793@oss.nttdata.com> (raw)
In-Reply-To: <ZMcJ7F7nkGkIs8zP@paquier.xyz>
References: <ZK9BdDI6KMxmiG+5@paquier.xyz>
<cb7d5257d1b1a25aa405c219732aaf8c@oss.nttdata.com>
<ZK9iLbi2l2rrELfV@paquier.xyz>
<97449ae1a3b2189934890f6d78b18216@oss.nttdata.com>
<ca567bd4076dfc7e8b0d39afe5b0cc22@oss.nttdata.com>
<CU69THFPG2CN.MK16RYW510YD@gonk>
<ZMI1/tQp/TQ1/m3B@paquier.xyz>
<cd09c86daa9e4c1c5f7903da39b75994@oss.nttdata.com>
<ZMMUiR7kvzPWenhF@paquier.xyz>
<CALj2ACVq=BogP=iQ0C=Pjzk4+rSTaKZU_+fdMRk4YyG8B60gAQ@mail.gmail.com>
<ZMcJ7F7nkGkIs8zP@paquier.xyz>
On 2023-07-31 10:10, Michael Paquier wrote:
> Attached is a new version.
Thanks for all the improvements.
I have some comments for v10.
(1)
<note>
<para>
- Extensions can add <literal>LWLock</literal> types to the list
shown in
- <xref linkend="wait-event-lwlock-table"/>. In some cases, the
name
+ Extensions can add <literal>Extension</literal> and
+ <literal>LWLock</literal> types
+ to the list shown in <xref linkend="wait-event-extension-table"/>
and
+ <xref linkend="wait-event-lwlock-table"/>. In some cases, the name
assigned by an extension will not be available in all server
processes;
- so an <literal>LWLock</literal> wait event might be reported as
- just <quote><literal>extension</literal></quote> rather than the
+ so an <literal>LWLock</literal> or <literal>Extension</literal>
wait
+ event might be reported as just
+ <quote><literal>extension</literal></quote> rather than the
extension-assigned name.
</para>
</note>
I think the order in which they are mentioned should be matched. I mean
that
- so an <literal>LWLock</literal> or <literal>Extension</literal>
wait
+ so an <literal>Extension</literal> or <literal>LWLock</literal>
wait
(2)
/* This should only be called for user-defined wait event. */
if (eventId < NUM_BUILTIN_WAIT_EVENT_EXTENSION)
ereport(ERROR,
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("invalid wait event ID %u", eventId));
I was just wondering if it should also check the eventId
that has been allocated though it needs to take the spinlock
and GetWaitEventExtensionIdentifier() doesn't take it into account.
Regards,
--
Masahiro Ikeda
NTT DATA CORPORATION
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: ikedamsh@oss.nttdata.com, michael@paquier.xyz, bharath.rupireddyforpostgres@gmail.com, tristan@neon.tech, andres@anarazel.de, pgsql-hackers@lists.postgresql.org
Subject: Re: Support to define custom wait events for extensions
In-Reply-To: <446d286f3272437df705ee69ad0d8793@oss.nttdata.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox