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 1x1Sfn-005DDk-29 for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Sep 2026 17:53:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x1Sfm-007Q9r-0N for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Sep 2026 17:53:26 +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 1x1Sfl-007Q9j-0f for pgsql-hackers@lists.postgresql.org; Tue, 01 Sep 2026 17:53:25 +0000 Received: from fhigh-a3-smtp.messagingengine.com ([103.168.172.154]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x1Sfh-00000002PIY-3gcJ for pgsql-hackers@postgresql.org; Tue, 01 Sep 2026 17:53:24 +0000 Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id 1CD541400157; Tue, 1 Sep 2026 13:53:19 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Tue, 01 Sep 2026 13:53:19 -0400 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=1788285199; x= 1788371599; bh=aKcr22OCzfOI2QD3n0siD8EH3evN+sxb/CvpYcE/WIM=; b=v UYI2bSz1XN6HNpCQWRXHioQgzPxZlNt+sHAXoF4dSd2DEGKMkSvOJC3y7Ln5RxOV xK60F6NjJUymTA+Yev3pCEXx1naEoZxNJbU0AJA61zrdFx0tb4ae2NqVOy3lv8AU BRGWh3jzTzw/29fXTkPb5urbKmxpve3rZ6TAojj0vjTxVF5hM3X9l7VVpcGyBY4p 6dqxIaQjBgNtKFzaQC9T9RvcL4qOdNwS2MFUT+0kEuqa3P279fG3m6k9B+Z4xNUM Jh09s1a/ct7rDEW2f8B/GREuwuPf74X37FiUD1usTQZEklizTbCpasRqzXsbxF5l 14/J1jtKadIEJhIyiGAjg== 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=fm3; t=1788285199; x=1788371599; bh=a Kcr22OCzfOI2QD3n0siD8EH3evN+sxb/CvpYcE/WIM=; b=HE7brpRXXQjRk3/8K XNoqvTIsZxJiv19oIOSV0ZBfc4+F2i8WfH6kBEHd0xkPId+8lptF00RrsSJk0V61 3sjmMm4MoFdoj2x85CxuP6p7GY9djqLczCdlwxF3VBy+48LG2+yzFZYr1uSZ87Eh sa1OFIYNztRV50duRpuRw93IjdMO/HKc8yc+EfVryYf3iyDyyxUMDebfnD7rsgaI ZHdTmmoN0GqLE6sJuzEUKHWYl5FaLhscBobTrUfyw3vyvcmPe+lfYjOTMmoT4SWl B2UF/GkxJnIH+4e4saBLrfWlt9XZKj7UJnXXSby5kNwQoxqOmg5eOZGpnj18hNhq WcbRg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTGvaqxacgNGtiZU8Ia2ZNOT2Q0G6okaCBM1r09mFH4VcHfKb1sFE6xI+U/NE3IRdw yKIOvgok2UJtGBrTualry2/ulpcxrCyWU0TtL0UtNyzGPaZHjAFJMY0m1ocpU2YnILvEJF 0QxgexvTPEnSxGAftmMbdMrauduuL6Vl/yNwCUgz4sEeolcofKL+nF6w9szncQ/qHzzSwD pYk70tjjFL3G/B4OrLDnHlGeLOFJ9aiS6Uw3f6YMLX/g9QCkBag23iDm7NRAJ0BQ4wBFpn 6d+T1cyxUZIIX2N7MskKazNIoa4u+oSj4SMkdTzdRjEMMJlUwMhmZhR9ePLhXBlx7yMmiD bpAPvBb0x7E/DCJzqUsdBC1rKEGLFCu5z4S3+6b+g69bI9A6Y/9UFd5/8cpQHnnO1DNfjW KjuTJzQ+YK5nER8I4qArPNPZKE/KfXmPuFRDlOxzNQ1Fy8oW4oojTpRwqCNQdGO3hBPR1A DYWBCNJPV7giHRREB6N6+zPkLsetEpLZhmWVnjzpHNQbNW9IJq0fWG/SLAHYnE6DLyXGMb XnKQzQi9TCewDRnU32CzUXeu8UY+GCYHZ+GgZzjVCGVkLJc83rnNOzk8j/Ej+qDz4Sm/WB ppwLT+FXPv2Ly/gZ0Ywql+VQffpVTp55zZNJ7qurwuZmp0aarx945rkpc4PA X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 1 Sep 2026 13:53:18 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1788285197; bh=C3iulFMr1FLHYCOtWsOtYJZeSlYRmKqWh3+T6R7xua4=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=8ZILUN/CUdiztcFgE2dyNvYqamhhSYue0qgmVb6upDhdD3Mj7E1fb0rKzpl5W+Rdv dqT90cFDSEe4LMIynRm7R9eTwATNVEyi4nBCUNx7SBVpx+GAKG963MyU5EuIK/Y/UW +yqKkfR0ZFMIM8JvoVbrqqATMfYudmQ7OFS3+tnqIUqmJZTOo8ey318BT0Fbiix9WY R7ZI629uS7t4egfYguDBCL93FbnoMNTzl/U5heHFAcFWCNxJteXpi2lAgkjgns4fkD 27fHP/vwqWkDyQqzGWUioznf2lMKUEBzWx9GaJC6o17Pzhk786zZplxVI3g87v9JyV TIT5B9yQEDN5g== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id 0BDFAB0017F; Tue, 01 Sep 2026 18:53:17 +0100 (BST) Date: Tue, 1 Sep 2026 19:53:17 +0200 From: Alvaro Herrera To: Antonin Houska Cc: Chao Li , Matthias van de Meent , Nathan Bossart , pgsql-hackers@postgresql.org Subject: Re: REPACK (CONCURRENTLY) fails when replica identity index is dropped Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <30425.1788257444@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-Sep-01, Antonin Houska wrote: > I agree that the core issue is that we allow dropping an index that is being > used as replica identity. > > Regarding catalog entries already broken this way, it appears that pg_upgrade > fixes them because pg_dump does not issue "ALTER TABLE ... REPLICA IDENTITY > USING INDEX ..." if there is not identity index. Thus after pg_restore, > pg_class(relreplident) becomes REPLICA_IDENTITY_DEFAULT. I agree that disallowing the drop is a sensible thing to do. I don't think such a behavioral change is backpatchable though, so let's confine us to pg19. The finding that pg_upgrade doesn't preserve the broken state is good, because we don't have to handle it in any particular way. I think the proposed implementation is flawed though, because the index might be dropped indirectly (maybe an opclass or extension is dropped CASCADE). I think it should happen somewhere in performDeletion() and friends, which is to say it should happen during doDeletion(), thus the check should be in index_drop(). Thanks -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Before you were born your parents weren't as boring as they are now. They got that way paying your bills, cleaning up your room and listening to you tell them how idealistic you are." -- Charles J. Sykes' advice to teenagers