pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Drouvot, Bertrand <bertranddrouvot.pg@gmail.com>
Cc: Masahiro Ikeda <ikedamsh@oss.nttdata.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: tgl@sss.pgh.pa.us
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: WIP: new system catalog pg_wait_event
Date: Sat, 19 Aug 2023 19:00:05 +0900
Message-ID: <ZOCSpcueqMduuJJ5@paquier.xyz> (raw)
In-Reply-To: <4fb03626-79aa-4c10-a002-2e5b71e65d22@gmail.com>
References: <ZNmvegQirGI9ifVw@paquier.xyz>
	<2f84b397-d020-493c-924c-610b9dd18f8d@gmail.com>
	<ZNxrMdmgrlovw1qD@paquier.xyz>
	<f2204399-cfdb-40e7-9479-9373ec6ba0ab@gmail.com>
	<735fbd560ae914c96faaa23cc8d9a118@oss.nttdata.com>
	<d28ad85d-1deb-4648-92a0-f38273fc91ca@gmail.com>
	<393fe340ab6980f399402a7dfbe13c4c@oss.nttdata.com>
	<0159e907-890d-4f11-8754-0311d7027bb7@gmail.com>
	<ZN9IZ2b7AdDZKSn/@paquier.xyz>
	<4fb03626-79aa-4c10-a002-2e5b71e65d22@gmail.com>

On Sat, Aug 19, 2023 at 11:35:01AM +0200, Drouvot, Bertrand wrote:
> Hi,
> 
> On 8/18/23 12:31 PM, Michael Paquier wrote:
> Thanks! Please find attached v9 fixing this typo.

I was looking at v8, and this looks pretty good to me.  I have
spotted a few minor things.

+  proretset => 't', provolatile => 's', prorettype => 'record',
This function should be volatile.  For example, a backend could add a
new wait event while a different backend queries twice this view in
the same transaction, resulting in a different set of rows sent back.

By the way, shouldn't the results of GetWaitEventExtensionNames() in
the SQL function be freed?  I mean that:
    for (int idx = 0; idx < nbextwaitevents; idx++)
        pfree(waiteventnames[idx]);
    pfree(waiteventnames);

+   /* Handling extension custom wait events */
Nit warning: s/Handling/Handle/, or "Handling of".
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (34+ messages)  latest in thread

Message-ID: <ZOCSpcueqMduuJJ5@paquier.xyz>
Permalink:  ../ZOCSpcueqMduuJJ5@paquier.xyz/
Also on:    postgresql.org/message-id/ZOCSpcueqMduuJJ5@paquier.xyz

 · 

reply

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: michael@paquier.xyz, bertranddrouvot.pg@gmail.com, ikedamsh@oss.nttdata.com, horikyota.ntt@gmail.com, tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org
  Subject: Re: WIP: new system catalog pg_wait_event
  In-Reply-To: <ZOCSpcueqMduuJJ5@paquier.xyz>

* 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