Re: race condition in pg_class

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Smolkin Grigory <smallkeen(at)gmail(dot)com>
Subject: Re: race condition in pg_class
Date: 2024-06-12 22:54:07
Message-ID: ZmonD5Qp9ev01Fge@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2024-06-12 23:11:56 Changing default -march landscape
Previous Message Jelte Fennema-Nio 2024-06-12 22:43:07 Re: RFC: adding pytest as a supported test framework