Re: Support to define custom wait events for extensions

From: Masahiro Ikeda <ikedamsh(at)oss(dot)nttdata(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>, andres(at)anarazel(dot)de, tristan(at)neon(dot)tech
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Support to define custom wait events for extensions
Date: 2023-07-19 03:52:10
Message-ID: 97449ae1a3b2189934890f6d78b18216@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I updated the patches.
* v6-0001-Support-custom-wait-events-for-extensions.patch

The main diffs are

* rebase it atop current HEAD
* update docs to show users how to use the APIs
* rename of functions and variables
* fix typos
* define a new spinlock in shared memory for this purpose
* output an error if the number of wait event for extensions exceeds
uint16
* show the wait event as "extension" if the custom wait event name is
not
registered, which is same as LWLock one.
* add test cases which confirm it works if new wait events for
extensions
are defined in initialize phase and after phase. And add a boundary
condition test.

Please let me know if I forgot to handle something that you commented,
and there are better idea.

Note:
I would like to change the wait event name of contrib modules for
example
postgres_fdw. But, I think it's better to do so after the APIs are
committed.
The example mentioned in docs should be updated to the contrib modules
codes,
not the test module.

Regards,
--
Masahiro Ikeda
NTT DATA CORPORATION

Attachment Content-Type Size
v6-0001-Support-custom-wait-events-for-extensions.patch text/x-diff 31.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2023-07-19 03:54:49 Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication
Previous Message Zhang Mingli 2023-07-19 03:41:11 Re: harmonize password reuse in vacuumdb, clusterdb, and reindexdb