Re: WIP: new system catalog pg_wait_event

From: "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: WIP: new system catalog pg_wait_event
Date: 2023-08-07 15:11:50
Message-ID: 1dc98591-0d06-f0da-bc88-21f529d6fb8e@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 8/7/23 10:23 AM, Drouvot, Bertrand wrote:
> Hi,
>
> On 8/4/23 5:08 PM, Tom Lane wrote:
>> "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com> writes:
>>> Now that fa88928470 generates automatically code and documentation
>>> related to wait events, why not exposing the wait events description
>>> through a system catalog relation?
>>
>> I think you'd be better off making this a view over a set-returning
>> function.  The nearby work to allow run-time extensibility of the
>> set of wait events is not going to be happy with a static catalog.
>
> Oh right, good point, thanks!: I'll come back with a new patch version to make
> use of SRF instead.

Please find attached v2 making use of SRF.

v2:

- adds a new pg_wait_event.c that acts as the "template" for the SRF
- generates pg_wait_event_insert.c (through generate-wait_event_types.pl) that
is included into pg_wait_event.c

That way I think it's flexible enough to add more code if needed in the SRF.

The patch also:

- updates the doc
- works with autoconf and meson
- adds a simple test

I'm adding a new CF entry for it.

Regards,

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

Attachment Content-Type Size
v2-0001-pg_wait_event.patch text/plain 16.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2023-08-07 15:36:32 Re: generic plans and "initial" pruning
Previous Message Amit Langote 2023-08-07 14:25:30 Re: initial pruning in parallel append