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 cd09c86daa9e4c1c5f7903da39b75994@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
List 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 by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Support to define custom wait events for extensions
Next
From: "Shinoda, Noriyoshi (HPE Services Japan - FSIP)"
Date:
Subject: RE: remaining sql/json patches