pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Noah Misch <noah@leadboat.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>
Cc: Smolkin Grigory <smallkeen@gmail.com>
Subject: Re: race condition in pg_class
Date: Thu, 13 Jun 2024 07:54:07 +0900
Message-ID: <ZmonD5Qp9ev01Fge@paquier.xyz> (raw)
In-Reply-To: <20240612193223.fe.nmisch@google.com>
References: <20240512232923.aa.nmisch@google.com>
	<20240605181706.fe.nmisch@google.com>
	<CA+TgmobfMU5pdXP36D5iAwxV5WKE_vuDLtp_1QyH+H5jMMt21g@mail.gmail.com>
	<ZmJENQ1BiMoStBPD@paquier.xyz>
	<CA+TgmoZ_Qezv0+AXN4s=OumQwvo9cf+1e+BA=y42WKth+QQK+A@mail.gmail.com>
	<20240611021927.30.nmisch@google.com>
	<ZmfUgRBbyLIGoHyM@paquier.xyz>
	<20240612175452.de.nmisch@google.com>
	<CA+TgmoZdSOzXBO83qEUTe2jMQ92Ss3St8C1c59N2PPsTQ0T2Pg@mail.gmail.com>
	<20240612193223.fe.nmisch@google.com>

On Wed, Jun 12, 2024 at 12:32:23PM -0700, Noah Misch wrote:
> On Wed, Jun 12, 2024 at 02:08:31PM -0400, Robert Haas wrote:
>> Personally, I think the fact that injection point wait events were put
>> under Extension is a design mistake that should be corrected before 17
>> is out of beta.

Well, isolation tests and the way to wait for specific points in them
is something I've thought about when working on the initial injpoint
infrastructure, but all my ideas went down to the fact that this is
not specific to injection points: I've also wanted to be able to cause
an isolation to wait for a specific event (class,name).  A hardcoded
sleep is an example.  Even if I discourage anything like that in the
in-core tests because they're slow on fast machines and can be
unreliable on slow machines, it is a fact that they are used by
out-of-core code and that extension developers find them acceptable.

> Works for me.  I don't personally have a problem with the use of Extension,
> since it is a src/test/modules extension creating them.

That's the original reason why Extension has been used in this case,
because the points are assigned in an extension.

> Yes, the last line does refer to that.  Updated table:
> 
> STRATEGY                        | Paquier | Misch | Haas
> --------------------------------------------------------
> new "Injection Point" wait type | maybe   | yes   | yes
> INJECTION_POINT(...) naming     | yes     | yes   | no
> isolation spec says event names | yes     | no    | yes
> 
> I find that's adequate support for the first line.  If there are no objections
> in the next 24hr, I will implement that.

OK.  That sounds like a consensus to me, useful enough for the cases
at hand.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (86+ messages)  latest in thread

Message-ID: <ZmonD5Qp9ev01Fge@paquier.xyz>
Permalink:  ../ZmonD5Qp9ev01Fge@paquier.xyz/
Also on:    postgresql.org/message-id/ZmonD5Qp9ev01Fge@paquier.xyz

 · 

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: michael@paquier.xyz, noah@leadboat.com, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, smallkeen@gmail.com
  Subject: Re: race condition in pg_class
  In-Reply-To: <ZmonD5Qp9ev01Fge@paquier.xyz>

* 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