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: Tristan Partin <tristan@neon.tech>, andres@anarazel.de,
pgsql-hackers@lists.postgresql.org
Date: 2023-07-27T09:29:22Z
Lists: pgsql-hackers
Hi, all.
Sorry for late reply.
> I am still mid-way through the review of the core APIs, but attached
> is my current version in progress, labelled v8. I'll continue
> tomorrow. I'm aware of some typos in the commit message of this
> patch, and the dynamic bgworker launch is failing in the CI for
> VS2019 (just too tired to finish debugging that today).
I suspect that I forgot to specify "volatile" to the variable
for the spinlock.
+/* dynamic allocation counter for custom wait events for extensions */
+typedef struct WaitEventExtensionCounter
+{
+ int nextId; /* next ID to assign */
+ slock_t mutex; /* protects the counter only */
+} WaitEventExtensionCounter;
+
+/* pointer to the shared memory */
+static WaitEventExtensionCounter * waitEventExtensionCounter;
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