Re: Support to define custom wait events for extensions
| От | Masahiro Ikeda |
|---|---|
| Тема | Re: Support to define custom wait events for extensions |
| Дата | |
| Msg-id | cd09c86daa9e4c1c5f7903da39b75994@oss.nttdata.com обсуждение исходный текст |
| Ответ на | Re: Support to define custom wait events for extensions (Michael Paquier <michael@paquier.xyz>) |
| Ответы |
Re: Support to define custom wait events for extensions
|
| Список | 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
В списке pgsql-hackers по дате отправления: