Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sGr74-000Kuz-5S for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Jun 2024 02:19:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sGr71-0019Iq-VL for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Jun 2024 02:19:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sGr71-0019Gu-DS for pgsql-hackers@lists.postgresql.org; Tue, 11 Jun 2024 02:19:52 +0000 Received: from mail-ot1-x329.google.com ([2607:f8b0:4864:20::329]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sGr6v-0011sX-0j for pgsql-hackers@postgresql.org; Tue, 11 Jun 2024 02:19:51 +0000 Received: by mail-ot1-x329.google.com with SMTP id 46e09a7af769-6f9923df5dbso368504a34.2 for ; Mon, 10 Jun 2024 19:19:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1718072383; x=1718677183; darn=postgresql.org; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=G32kVC5LCbR4zwRIRBniwRixL4q+rNXmRxLTVFIT7B4=; b=RzSnfUbjpXIocfmKG58tRXenJn1hzObJ4yY/nYRPosXDUZBlZeKaFb/42qOQPNzvN9 RMS+S+GRyqX4ZBBK/pjsLgnEmGIiU0bCiah+Rzuv8XACYANnrD0/6XtHllROpZgc4viH /RGqoxIAc707Rb2jw/fO7xoaErHGp1pnD4rU4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718072383; x=1718677183; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=G32kVC5LCbR4zwRIRBniwRixL4q+rNXmRxLTVFIT7B4=; b=AypTO2PC7JK1c5LTcMsoKcQVnbl4RZYRUp7z77rrvpyD67w9ar3pTDMURrLGwgvcEt wN0DjdMubHqGE5ku8Ys4C7wytDVkGwvFd0Sj85iBEcOjXKNHXEDHGNMNSMwecJRPNG+W ijTioIIO8gpcucj8WpQS608E1QAFG77eICJe3r5COeiW+gezCy4mqiVgeX/1Bi7beEyP BegIPg3VMIKDWyVrBeHfSn2B6lhHEuHnQ6RjDezfYlFxRzVQiF+4Rw1QClMvAwRYcmYA ghgapnKZj98NHv93bI06Vtwfkcq9jTCrzwpw6cOxi6VyOo4o/oWpr70pSMar1kcZA1da GU7w== X-Gm-Message-State: AOJu0Yycua6TQjOWhzV6R2pBktLEFKrll9sR3NklsCRNGoSmiBITLxMB 1rj2fYCfhhuFbQlzyqk1MjYjmg3Y7+MXIAtZ/C26DUNVRUQgzaSkPJDvH074Wg== X-Google-Smtp-Source: AGHT+IHrWoL/Kk7xGVQHOELUN4XEnXAM73ytaMbTD0OfHksYdNTQxraJIofs0QKG37/y/Dt7zsyWbw== X-Received: by 2002:a9d:734d:0:b0:6f9:d351:8762 with SMTP id 46e09a7af769-6f9d351885dmr3213883a34.28.1718072370130; Mon, 10 Jun 2024 19:19:30 -0700 (PDT) Received: from google.com ([2600:1702:a20:5750::48]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-6f972baa693sm1174905a34.79.2024.06.10.19.19.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jun 2024 19:19:29 -0700 (PDT) Date: Mon, 10 Jun 2024 19:19:27 -0700 From: Noah Misch To: Michael Paquier , Robert Haas Cc: pgsql-hackers@postgresql.org, Tom Lane , Smolkin Grigory Subject: Re: race condition in pg_class Message-ID: <20240611021927.30.nmisch@google.com> References: <1596629.1698435146@sss.pgh.pa.us> <20231027214946.79.nmisch@google.com> <1617596.1698446455@sss.pgh.pa.us> <20231027232612.99.nmisch@google.com> <20231102030915.d3.nmisch@google.com> <20240512232923.aa.nmisch@google.com> <20240605181706.fe.nmisch@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/2.2.12 (2023-09-09) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Jun 07, 2024 at 09:08:03AM -0400, Robert Haas wrote: > On Thu, Jun 6, 2024 at 7:20 PM Michael Paquier wrote: > > On Thu, Jun 06, 2024 at 09:48:51AM -0400, Robert Haas wrote: > > > It's not this patch set's fault, but I'm not very pleased to see that > > > the injection point wait events have been shoehorned into the > > > "Extension" category - which they are not - instead of being a new > > > wait_event_type. That would have avoided the ugly wait-event naming > > > pattern, inconsistent with everything else, introduced by > > > inplace050-tests-inj-v1.patch. > > > > Not sure to agree with that. The set of core backend APIs supporting > > injection points have nothing to do with wait events. The library > > attached to one or more injection points *may* decide to use a wait > > event like what the wait/wakeup calls in modules/injection_points do, > > but that's entirely optional. These rely on custom wait events, > > plugged into the Extension category as the code run is itself in an > > extension. I am not arguing against the point that it may be > > interesting to plug in custom wait event categories, but the current > > design of wait events makes that much harder than what core is > > currently able to handle, and I am not sure that this brings much at > > the end as long as the wait event strings can be customized. > > > > I've voiced upthread concerns over the naming enforced by the patch > > and the way it plugs the namings into the isolation functions, by the > > way. > > I think the core code should provide an "Injection Point" wait event > type and let extensions add specific wait events there, just like you > did for "Extension". Michael, could you accept the core code offering that, or not? If so, I am content to implement that. If not, for injection point wait events, I have just one priority. The isolation tester already detects lmgr locks without the test writer teaching it about each lock individually. I want it to have that same capability for injection points. Do you think we can find something everyone can accept, having that property? These wait events show up in tests only, and I'm happy to make the cosmetics be anything compatible with that detection ability.