Re: Support to define custom wait events for extensions
Masahiro Ikeda <ikedamsh@oss.nttdata.com>
From: Masahiro Ikeda <ikedamsh@oss.nttdata.com>
To: Michael Paquier <michael@paquier.xyz>, andres@anarazel.de,
tristan@neon.tech
Cc: pgsql-hackers@lists.postgresql.org
Date: 2023-07-19T03:52:10Z
Lists: pgsql-hackers
Attachments
- v6-0001-Support-custom-wait-events-for-extensions.patch (text/x-diff) patch v6-0001
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
Commits
-
Change custom wait events to use dynamic shared hash tables
- af720b4c50a1 17.0 landed
-
Support custom wait events for wait event type "Extension"
- c9af05465307 17.0 landed
-
Add WAIT_EVENT_{CLASS,ID}_MASK in wait_event.c
- 7395a90db87b 17.0 landed
-
worker_spi: Switch to TAP tests
- 320c311fda91 17.0 cited
-
Simplify some conditions related to [LW]Lock in generate-wait_event_types.pl
- c17164aec88c 17.0 landed