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>
Cc: Andres Freund <andres@anarazel.de>, Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.com>, Tristan Partin
<tristan@neon.tech>, pgsql-hackers@lists.postgresql.org
Date: 2023-08-10T04:08:39Z
Lists: pgsql-hackers
Attachments
- v3-0002-poc-custom-wait-event-for-dblink.patch (text/x-diff) patch v3-0002
- v3-0001-Change-to-manage-custom-wait-events-in-shared-hash.patch (text/x-diff) patch v3-0001
Hi, Thanks for your comments about the v2 patches. I updated to v3 patches. The main changes are: * remove the AddinShmemInitLock assertion * add the new lock (WaitEventExtensionLock) to wait_event_names.txt * change "static const int wee_hash_XXX_size" to "#define XXX" * simplify worker_spi. I removed codes related to share memory and try to allocate the new wait event before waiting per background worker. * change to elog from ereport because the errors are for developers. * revise comments as advised. * fix the request size for shared memory correctly * simplify dblink.c * fix process ordering of WaitEventExtensionNew() as advised to avoid leading illegal state. In addition, I change the followings: * update about custom wait events in sgml. we don't need to use shmem_startup_hook. * change the hash names for readability. (ex. WaitEventExtensionNameHash -> WaitEventExtensionHashById) * fix a bug to fail to get already defined events by names because HASH_BLOBS was specified. HASH_STRINGS is right since the key is C strings. I create a new entry in commitfest for CI testing. (https://commitfest.postgresql.org/44/4494/) Thanks for closing the former entry. (https://commitfest.postgresql.org/43/4368/) 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