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 1wLqJQ-0023UL-2k for pgsql-hackers@arkaria.postgresql.org; Sat, 09 May 2026 22:38:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wLqJP-00Dzek-2H for pgsql-hackers@arkaria.postgresql.org; Sat, 09 May 2026 22:38:19 +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 1wLqJO-00Dzeb-2b for pgsql-hackers@lists.postgresql.org; Sat, 09 May 2026 22:38:19 +0000 Received: from fout-a3-smtp.messagingengine.com ([103.168.172.146]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wLqJJ-00000001SuN-1tku for pgsql-hackers@postgresql.org; Sat, 09 May 2026 22:38:18 +0000 Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id C195FEC010D; Sat, 9 May 2026 18:38:10 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Sat, 09 May 2026 18:38:10 -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=fm1; t=1778366290; x= 1778452690; bh=7onE+AfL9Na/ulAzxgIC72kVwrpcJaLxVGL1WBR3+Zs=; b=Z XZmnSSOjUcw8KN6GO3AFgsxQqzHaSpLC5qCBYTfX9b0t48WK/ek0EJlFAog4eKqt yjDeuo62Qehl17rv3skM6S/M5scf5LdNTDOv3j+qRA7wRhbYcOOJ8BBpI6Jxj4P3 3vG/hJqJYsjqM0LJ6DlMNEx4++7KbdwRxeItq9qNq4L62oMvlNFPOE8oKFO+WXT9 PXRsdrDseWXt4lN+K+lOC3mosDGvSZFgkRvHq+pCYM4rQKpeiGfDMFyk1K1aw9vI c40AxlqsZVSiEt6Z9HvZhXAgJOJOtZZQ4OPPJbaY5SaKc4j5dBBQb3uwjJd3Yot4 sES1lxu41e93A3sg6Be/Q== 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=1778366290; x=1778452690; bh=7 onE+AfL9Na/ulAzxgIC72kVwrpcJaLxVGL1WBR3+Zs=; b=ExIW6STOZU8Kw+yIN N+FOY4Dt3nxa1wSSocZePqRkMekffnJUUxKh8UcaKMJTpkACw4UF0ZHEt9IXJQDn CclhupEjq86nT34ti+/zozBTmh9dUrVVe8QyiMW0j0QDj+fImRaPTAek2w8obxcg VrSlJvhhMUu9q8c+kQOemEXpZkQgM6dq5BkYW0hLIlBd2m/E/n4hG1lyDAIqrs6K ZRvX12Zb1itjA2NX7pGh9Yms3arAUIHr3VxygcZPC3PBbp3mOmPrDWLMhejjnZxK tAttQhmzVGDIpj2o6fyP2tkbwnktgSnKF3yvebFU18dmAJAn2nB3x4veTq8B0D5m 7GfPw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdduudeggeehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheplmhlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsehkuhhrihhlvghmuhdruggvqeenucggtf frrghtthgvrhhnpeetuedvheffkeevgfeuheevteevkefggedttdeufeeuheduuddthfef fffhjeefffenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgv sehkuhhrihhlvghmuhdruggvpdhnsggprhgtphhtthhopeefpdhmohguvgepshhmthhpoh huthdprhgtphhtthhopehlihdrvghvrghnrdgthhgrohesghhmrghilhdrtghomhdprhgt phhtthhopehrvghshhhkvghkihhrihhllhesghhmrghilhdrtghomhdprhgtphhtthhope hpghhsqhhlqdhhrggtkhgvrhhssehpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 9 May 2026 18:38:10 -0400 (EDT) Received: by ida.kurilemu.internal (Postfix, from userid 1000) id 19CE4B05F77; Sun, 10 May 2026 00:38:08 +0200 (CEST) Date: Sun, 10 May 2026 00:38:08 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Chao Li Cc: Kirill Reshke , PostgreSQL-development Subject: Re: Fix REPACK with WITHOUT OVERLAPS replica identity indexes Message-ID: 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 On 2026-May-09, Chao Li wrote: > > On May 9, 2026, at 01:47, Kirill Reshke wrote: > > > > On Fri, 8 May 2026 at 09:22, Chao Li wrote: > >> While testing UPDATE FOR PORTION OF, I started wondering whether > >> REPACK supports temporal tables. In theory, it should, because > >> temporal WITHOUT OVERLAPS indexes can be used as replica identity > >> indexes. So I created a test script, repack_temporal.spec, which is > >> included in the attached patch, and it failed. Nice find, thanks for testing. > >> I found that REPACK hard-codes BTEqualStrategyNumber when calling > >> get_opfamily_member(). That seems wrong, because > >> build_replindex_scan_key() uses IndexAmTranslateCompareType() to > >> get the equality strategy for COMPARE_EQ. Makes sense. I think it would be a good idea to make identity_key_equal() not deform all attributes, but instead only up to the last one it needs for the key comparisons. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/