Re: Support to define custom wait events for extensions - Mailing list pgsql-hackers

From Masahiro Ikeda
Subject Re: Support to define custom wait events for extensions
Date
Msg-id 97449ae1a3b2189934890f6d78b18216@oss.nttdata.com
Whole thread Raw
In response to Re: Support to define custom wait events for extensions  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Support to define custom wait events for extensions
Re: Support to define custom wait events for extensions
List 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

pgsql-hackers by date:

Previous
From: Zhang Mingli
Date:
Subject: Re: harmonize password reuse in vacuumdb, clusterdb, and reindexdb
Next
From: Amit Kapila
Date:
Subject: Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication