pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Masahiro Ikeda <ikedamsh@oss.nttdata.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Tristan Partin <tristan@neon.tech>
Cc: andres@anarazel.de
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Support to define custom wait events for extensions
Date: Thu, 27 Jul 2023 18:29:22 +0900
Message-ID: <cd09c86daa9e4c1c5f7903da39b75994@oss.nttdata.com> (raw)
In-Reply-To: <ZMI1/tQp/TQ1/m3B@paquier.xyz>
References: <c18393a428412ede7acd2355c27b3c1f@oss.nttdata.com>
	<ZK0IluceH+Hd5h22@paquier.xyz>
	<eaf82a85c0ef1b55dc3b651d3f7b867a@oss.nttdata.com>
	<ZK5oZ6wzVrgk5wuT@paquier.xyz>
	<ZK9BdDI6KMxmiG+5@paquier.xyz>
	<cb7d5257d1b1a25aa405c219732aaf8c@oss.nttdata.com>
	<ZK9iLbi2l2rrELfV@paquier.xyz>
	<97449ae1a3b2189934890f6d78b18216@oss.nttdata.com>
	<ca567bd4076dfc7e8b0d39afe5b0cc22@oss.nttdata.com>
	<CU69THFPG2CN.MK16RYW510YD@gonk>
	<ZMI1/tQp/TQ1/m3B@paquier.xyz>

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





view thread (78+ messages)  latest in thread

Message-ID: <cd09c86daa9e4c1c5f7903da39b75994@oss.nttdata.com>
Permalink:  ../cd09c86daa9e4c1c5f7903da39b75994@oss.nttdata.com/
Also on:    postgresql.org/message-id/cd09c86daa9e4c1c5f7903da39b75994@oss.nttdata.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: ikedamsh@oss.nttdata.com, michael@paquier.xyz, tristan@neon.tech, andres@anarazel.de, pgsql-hackers@lists.postgresql.org
  Subject: Re: Support to define custom wait events for extensions
  In-Reply-To: <cd09c86daa9e4c1c5f7903da39b75994@oss.nttdata.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox