Re: WIP: new system catalog pg_wait_event

Bertrand Drouvot <bertranddrouvot.pg@gmail.com>

From: "Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>, tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org
Date: 2023-08-16T11:43:35Z
Lists: pgsql-hackers

Attachments

Hi,

On 8/16/23 8:22 AM, Michael Paquier wrote:
> On Wed, Aug 16, 2023 at 07:04:53AM +0200, Drouvot, Bertrand wrote:
>> I'd prefer the singular form. There is a lot of places where it's already used
>> (pg_database, pg_user, pg_namespace...to name a few) and it looks like that using
>> the plural form are exceptions.
> 
> Okay, fine by me.  

Great, singular form is being used in v6 attached.

> Also, I would remove the "wait_event_" prefixes to
> the field names for the attribute names.
> 

It looks like it has already been done in v5.

>> Yeah, now that af720b4c50 is done, I'll add the custom wait events handling
>> in v6.
> 
> Thanks.  I guess that the hash tables had better remain local to
> wait_event.c.

Yeah, agree, done that way in v6 (also added a test in 001_worker_spi.pl
to ensure that "worker_spi_main" is reported in pg_wait_event).

I added a "COLLATE "C"" in the "order by" clause's test that we added in
src/test/regress/sql/sysviews.sql (the check was failing on my environment).

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Commits

  1. doc: Improve example query related to pg_wait_events

  2. Add system view pg_wait_events