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 1vG3PL-0074ce-Sf for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Nov 2025 22:52:15 +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 1vG3PK-009zJL-Qg for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Nov 2025 22:52:13 +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 1vG3PK-009zJD-H1 for pgsql-hackers@lists.postgresql.org; Mon, 03 Nov 2025 22:52:13 +0000 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vG3PH-005pIt-1Q for pgsql-hackers@postgresql.org; Mon, 03 Nov 2025 22:52:13 +0000 Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-b556284db11so4150411a12.0 for ; Mon, 03 Nov 2025 14:52:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1762210328; x=1762815128; 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=QWOOWHB5wojj82kjlKSkeIs89gqm477WBp2A5mm1Ju0=; b=MkH7UsH9p7sF0fMOaTOY0wnHzjxXKCxxmVSXvwOoNEAn0EDjcKG8EGVLQGX9CREwqi 1LB2JmhL2Ok5uAyrMu2MgZOZSRqw3QT9OcU6w5otSeUdISDoL4lsfrw13RWdYIpo/yEN eeM8vfsBO8IaMl9Wfgg329HRy4XSDdAEjfKjU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762210328; x=1762815128; 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=QWOOWHB5wojj82kjlKSkeIs89gqm477WBp2A5mm1Ju0=; b=qj63HwGpb+NLzD+nvunTFzMcRiTZbxIRvkeBLYKlf+luxDPCtkxMpQjlx4vMVT9iDv zSjWbcQ/fnqlbbSUPWezFG5QC00IFx4/wRN+emnlVxE5fg9FisbTE/QK+1+VwNlsXibG wSyLhFbxJZuJ2gA4kl7dU+K3Cg8UbcYEBwd81o2fDcllNdA5BHhtAKfftqVSG+GkYQe1 BQ1vdlBlHWqRWlXddTnKdJfsYj9X0kgSrHgxSawdkvY6wATB9e6YGMxBOBRzX6YL5jm5 eSCaNXshJOovXuOImRO3TwiOVNwfOhwsgo74E5VJDTTu/12VYvGFp0Cp2KB7eTpXXjK6 qHiw== X-Forwarded-Encrypted: i=1; AJvYcCXRVZDBsFrvTFI9js389RtJfUngns9RPL3rB6tHeiKuqvCkjectBDB+25uTi91pGuRn0/K083W8ff4ZNTwt@postgresql.org X-Gm-Message-State: AOJu0YxlNKZk40QU7FnqoZKMVQ1vJp50TEtu0EQuJepuDkbi8oOcretl +UUNTss0fx2P9SItN8ezhEE4jz58lPtEztFSeeIDLg+jM8kwCuhGRIYWG2M7HggNWw== X-Gm-Gg: ASbGncujtB/6tzGXGj3yDDJoUcPQJJadBLmr7sSfcXXUOJX+iUBz666FYb1I98tVinm Xo9yAXm9pBdiFF+eDQm0bpgGITC/equEb3HchPgusgsiiXe9C9oUThJXuDJ/pPoOVmwo5JVx9D0 XdVegej409K2LRp2gNAOG7hyRr5V9LQUqQHcCtQA2VKLmIJhVEt0pHBpEF9C/kuEUc/pCKsoH7a 5E3nEhb4ZCCY6dPSgOpeB+/UkZmTDwlQ7HO+Rdb35T7bElHgz21ZTs3jJNSuxwjff3mcaOJQ8D7 fNpU9AjM859D2bpQERmA02uCzUETPBd2oT55kb8WBgjNcgbaUfpnmaxIbw8STtlcC9t3aLMRGdU XLPNad01WarTBBuMPQO/c29aAolRKcJzu1QuXMs5owK4scDDy6h2bmwt4ng9Gy4D+7EvC8fAS33 R24gZrzfCu9r7OphvgYnneEsbY2Ok9y1povo4+TuQDN1uMc4cr/Q== X-Google-Smtp-Source: AGHT+IHVfqsxph/l6VhgXEgDuohZd6loXMc+6zHzurwqF4W664pTPwCDIN4F/csSQ1ymwHHDYJ/zsQ== X-Received: by 2002:a17:902:ce89:b0:295:7b8c:6611 with SMTP id d9443c01a7336-2957b8c6829mr89512085ad.15.1762210327916; Mon, 03 Nov 2025 14:52:07 -0800 (PST) Received: from google.com (c-73-15-160-255.hsd1.ca.comcast.net. [73.15.160.255]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7acd382ad96sm540991b3a.22.2025.11.03.14.52.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Nov 2025 14:52:07 -0800 (PST) Date: Mon, 3 Nov 2025 14:52:05 -0800 From: Noah Misch To: Mihail Nikalayeu Cc: Michael Paquier , PostgreSQL Hackers Subject: Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY Message-ID: <20251103225205.a4.nmisch@google.com> References: <20251027180606.f4.nmisch@google.com> <20251102232105.a3@rfd.leadboat.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 Mon, Nov 03, 2025 at 09:41:00PM +0100, Mihail Nikalayeu wrote: > On Mon, Nov 3, 2025 at 12:21 AM Noah Misch wrote: > > Thanks. Does "ON CONFLICT ON CONSTRAINT constraint_name" avoid the problem w/ > > concurrent REINDEX CONCURRENTLY? A search of the thread found no mention of > > "ON CONSTRAINT". It seems safe to assume that clause would avoid problems w/ > > CREATE INDEX CONCURRENTLY, but that's less certain for REINDEX. > > It is also affected. There is a special > reindex_concurrently_upsert_on_constraint spec in the patch. > And even a special commit (0004) to fix it :) My mistake. I've redone the mbox search that I thought I had done. That search should have found it yesterday, so I must have made a typo then. > I removed the mention of "ON CONSTRAINT" and added a small comment > near infer_arbiter_indexes. > > Doc patch is 0001, other - specs and fixes for future. I re-flowed the new comment to the standard 78 columns and pushed 0001. Thanks.