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 1wVTlf-001zT0-2K for pgsql-bugs@arkaria.postgresql.org; Fri, 05 Jun 2026 12:35:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wVTld-00CMMi-2K for pgsql-bugs@arkaria.postgresql.org; Fri, 05 Jun 2026 12:35:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wVTld-00CMMa-1W for pgsql-bugs@lists.postgresql.org; Fri, 05 Jun 2026 12:35:17 +0000 Received: from mail.nimrod.no ([195.139.160.70]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wVTlb-00000001Ej7-1ZHB for pgsql-bugs@lists.postgresql.org; Fri, 05 Jun 2026 12:35:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nimrod.no; s=n20260101; t=1780662912; bh=rlXsv0IlwuedU7zjK7SeIdbxiudmvJCtzmUmvZcNfF0=; h=Date:From:To:Subject:In-Reply-To:References:From; b=vbB61CiAfUslKhl7dfsfdFGa9PhJt5kWpAQfuRW2n803mniHroNNPQK6dEGQrhrYk e4nmlAJpZ0en9QXrwFExMQEkNLGOnUSqo/m8DtlAKdi7s5f4HsadPiBAKmpA+sl2Rt mlufR8fMLXuY/7xIo0TAhYLjbA5gdIw0Po2NxuKT7CJHYTk08OXtDwMjjROwfgokQV TX+gAehbdnDZ3VJ7H9PpiJjMjO3GAygIlkFC82XqV4+klhY75mEpVRo3O8TXw7/aSl wxIsn47cQVvhAoWlm8Efifkpw0jVEiqNDx1ZoYSsvlQAMzdUeDi4hX6fMPRltvwvMI cTqVKMb2MxiFg== MIME-Version: 1.0 Date: Fri, 05 Jun 2026 14:35:12 +0200 From: Dag Lem To: pgsql-bugs@lists.postgresql.org Subject: Re: REINDEX (CONCURRENTLY) TABLE handles DEFERRED constraints as IMMEDIATE while processing In-Reply-To: References: Message-ID: <8b6235fa96a521f8f9b80f6723022b47@nimrod.no> X-Sender: dag@nimrod.no Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-06-05 13:25, Dag Lem wrote: > While processing, "REINDEX (CONCURRENTLY) TABLE table_name" temporarily > treats the DEFERRED constraints as IMMEDIATE, causing transactions to > fail with errors on the form 'ERROR: duplicate key value violates > unique constraint "uq_constraint_name"'. Apologies, this should be "constraint_name_ccnew" - the new index backing the constraint. Best regards, Dag Lem