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.96) (envelope-from ) id 1vObB9-00EcFt-0t for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Nov 2025 12:32:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vObB7-0068IY-2L for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Nov 2025 12:32:54 +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.96) (envelope-from ) id 1vObB6-0068IP-32 for pgsql-hackers@lists.postgresql.org; Thu, 27 Nov 2025 12:32:53 +0000 Received: from fout-b6-smtp.messagingengine.com ([202.12.124.149]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vObB3-001mgW-2r for pgsql-hackers@postgresql.org; Thu, 27 Nov 2025 12:32:52 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id 2571F1D0002F; Thu, 27 Nov 2025 07:32:47 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Thu, 27 Nov 2025 07:32:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm2; t=1764246767; x= 1764333167; bh=q4hs73PLQ0kFAJ5wO+WtWsmxlnn7Ei3ZRA7QPH4Y0yQ=; b=0 EG9i51eTb98g9AHvm/vSITRBW5Qyi/kvqTwRed4W05G7uQEm0UXjm4az5W6nqA8n +0/uWP1T4fjAxgtD26Wsyj9wQOmYwu06rF0FEmA/xfuhUOiZI9bco4G+kh7CbMUq GFQ/KtxM28ahk4S0/LOZaZjnjfPTztpeFcOO5YLnRCwiPyrSEBUg61b1SYVQwGno Z9MccO6OuNtXzQtUjTlTMizOpDFvJL6zguiCoKtHEvSvc1VDBFdWAvB78g1eB4Ci wbFMFhkhBEpTfOc+6t0koFIoEpDwRYI4nQSf0KP6XwIeGpd5Z+lXupqWEbzu7MkL TWpxADX8OmVoi1fZdFpIA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1764246767; x=1764333167; bh=q 4hs73PLQ0kFAJ5wO+WtWsmxlnn7Ei3ZRA7QPH4Y0yQ=; b=t3vsTK1FxOAkP6p4K jXw5Zn4ZpymxjyoCx5lNfY+xazrNWjW9/VcFIdRfa44LZUhnKzg5upjztP/j1KLx g1+232Rlo6fIz2x0rgoIFT/LEmYkheO2COS+632Q7jkjCkitjArcsUSSnzqrXWN4 9N6EgTcNjzisHGJbKPqtoXLqo+hf2sF2CQHpWkYpG40MNZDXnuXn3Q2BTKtViSxz yQz5fFpuTk8ZarHPfYeWSawtMj0OryfBTV/Pv1R+EJiYXZOEagMl57RLoyhjtXF7 aIElr8+goTaEQxf23GZUReeC51NS7mnZ0GNq13luZTFrKPsdoQAAwiokjJad7uy2 EJ3xA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddvgeejvdegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheplmhlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsehkuhhrihhlvghmuhdruggvqeenucggtf frrghtthgvrhhnpeetuedvheffkeevgfeuheevteevkefggedttdeufeeuheduuddthfef fffhjeefffenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgv sehkuhhrihhlvghmuhdruggvpdhnsggprhgtphhtthhopeegpdhmohguvgepshhmthhpoh huthdprhgtphhtthhopehmihhhrghilhhnihhkrghlrgihvghusehgmhgrihhlrdgtohhm pdhrtghpthhtohepnhhorghhsehlvggruggsohgrthdrtghomhdprhgtphhtthhopehmih gthhgrvghlsehprghquhhivghrrdighiiipdhrtghpthhtohepphhgshhqlhdqhhgrtghk vghrshesphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 27 Nov 2025 07:32:46 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1764246764; bh=3tfV9M8wERrd7WPMrZW8yCy1EMBjmjdYPlZyBMrEtfY=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=A8fQ/zwQ+tLimnh0r22CkdsQIHwf+c5n/rxTHWo+JvC9+AuMHs/qkmohO6cAW94YA sr6nZfGrCTaUGIZsiVLL05yo80Wp6s0hJp0uWqHf8ZQpx9npzqdmp+YT3H5G3tPRSc fQZnnJEQD13OxGUdk1Jj4Vorg5OG7Qk1pfsj2ZVkzjZHD0Gq8ruJj629dGhdaGV9oZ M5wNRankr3LERc+MgMyqhewFv11udzJYFM1mLgzpZnru5COwHwhOmC2+An7c2lgpzx O/WzuXIQRePLQvLBAJb81JsuxvU9+8d2iLdIZqt4D3ftqZkYPVG5YcCmkmKUw6lsI6 ligJMlLbKiaxw== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id 3787376; Thu, 27 Nov 2025 13:32:44 +0100 (CET) Date: Thu, 27 Nov 2025 13:32:44 +0100 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Mihail Nikalayeu Cc: Michael Paquier , Noah Misch , PostgreSQL Hackers Subject: Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY Message-ID: <202511271229.zkwkjepzcean@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2025-Nov-27, Mihail Nikalayeu wrote: > On Wed, Nov 26, 2025 at 7:34 PM Álvaro Herrera wrote: > > We ran into one more problem with the new test, evidenced by timeouts by > > buildfarm member prion. For CATCACHE_FORCE_RELEASE builds on two of the > > tests, we get a few invalidations of the catalog snapshot ahead of what > > we expect, and because we have an injection point to sleep there, those > > tests get stuck. > > Oh, I missed that. Non-yet pushed tests are probably affected too. Yeah, I suspect as much. > > Here's one possible fix. > > I have tried to move the setup of invalidate-catalog-snapshot-end to > s1_start_upsert as the first command - but for some reason it wasn't > working the way I expected. But maybe I missed something. Right, this is why I said that this is one possible fix. I mean, maybe there are other ways to fix it. I'm not sure it's the simplest or the most robust, but I don't want to spend too much time looking for other ways either. > Solution seems reasonable to me, another related ideas: > * replace "select case when" with function like > injection_points_wakeup_if_waiting to avoid the possible race between > select and wake up (but AFAIK it is not possible in the current case) > * introduce some injection_points function to enter "ignore all runs, > but still allowed to attach/detach" mode and "normal" mode.. As first > command of setup - enter such "setup mode", as last - back to normal. Ah, I had thought about the first one of these ideas, but not the second one. I noted both in the commit message, in case somebody is motivated to implement them. Thanks for reviewing. I have pushed it now. Looking at the next one. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "Having your biases confirmed independently is how scientific progress is made, and hence made our great society what it is today" (Mary Gardiner)