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.98.2) (envelope-from ) id 1x9IYl-00000001tmI-1Lle for pgsql-hackers@arkaria.postgresql.org; Wed, 23 Sep 2026 08:42:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1x9IYk-00000003rj1-2cgX for pgsql-hackers@arkaria.postgresql.org; Wed, 23 Sep 2026 08:42:34 +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.98.2) (envelope-from ) id 1x9IYj-00000003ris-3pa1 for pgsql-hackers@lists.postgresql.org; Wed, 23 Sep 2026 08:42:34 +0000 Received: from fout-a5-smtp.messagingengine.com ([103.168.172.148]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x9IYh-00000000ou9-1l2V for pgsql-hackers@lists.postgresql.org; Wed, 23 Sep 2026 08:42:33 +0000 Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfout.phl.internal (Postfix) with ESMTP id D4BA0EC011F; Wed, 23 Sep 2026 04:42:30 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Wed, 23 Sep 2026 04:42:30 -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=fm3; t=1790152950; x= 1790239350; bh=DcufjBmbfyQmaF5ZIuMF7Ej5TYNRWLjYAvbC68HFlXE=; b=C 5OTbAa7aCXJq3uRPSITiUfDPsJAAmi1HSB/KsAmVr5onztczlUBMvziqDTH8i6F5 QIRBUC77/WGHjt0eb8vMqdjfRE8+EwZBt2UUzSlTESMTOpFlVfA09wcgZbHVL/KZ HwvzO9jOsRXkvoCN8nr4lIERX9V3Pp12WJ0GzzkaPQRbilKE6p0BrRQtX3ovcALR Zi53j79yjaz7hswPrzilu2NfsJeQh4/sNhBNRbmTalyazM9/8SArDfinaj3mRplr k1NE8ltSHgHosbeGKYr0OcE+lJlY9G03hEs091IkTW5fTZBe06euVQBKp679ACb+ rV6XWJyc32Fjea5IOloxw== 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=1790152950; x=1790239350; bh=D cufjBmbfyQmaF5ZIuMF7Ej5TYNRWLjYAvbC68HFlXE=; b=K7iIJUzYzXWqCUUDN XmMl28BuJYAC4IqdqtSPgFiOf63FfpJQe/OIXrZXQgVYhCvVZZGEytQQhYgD0n1d qkDKtGz7ZjrOdkI/IVDTewMspJtCLZsCj8QsxSlsaxNPWe5YOVs7pIA9mtrLdWpQ YW4j5h4OuUKOw+8ekNDU+c3lIRk6C/PEm/lbjq/Pn6zAUYzD5bR3/++N7YbfeUKG gf2CBgGEf/QKRIRl6rhXHJudxJw8AELTMO+bacnTDbzvSTI5aZGTFX212FNdbs1S N15af8ZT3xiAkb+ufDRgMZBhRGOF5M8/8jG/YB81mWg4wCgaPor6QKIV8k0S+9Bk VUCvA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTGSlbVj6SdyaykvhkrSj6l+3S0FELVpCZm+nKiWCSO4vD9x9uQQ6F5P5n6qq4Oiil P/hWMYsjt68mbd5Xamk5n1GUHr6HO3SDPl2FMqOj32qctzdx5Zy6eQDWWElgDBsBcDZmVE b9VQU82YYMooJE40VEJ1TYom5e9QOvpbbvRG4Oz3BbTr+GbRwq3hVahOzWBbOba6UAdOed hIPDdidJlzEdVFyZOabnaGIypfKIM+tQ+AcW5eudlEZQy3SvCLqpMWLj9rWN46Ls3M5Wly EYjoTbD5Tja6iKf9c9sDgYU8lZb8xItyH12lNH9rdXvKA31jPk4Qoq4TMAt24/39qAZ8k9 PSbljjGFXtyoD4PowyItm7hCmN6Hoc+h4lM74F5eDilYird8RdB6LxrXwOgTk5dOJD3rhN FijI0ItgHoUZZXo06kBsTHxugoQx90/BkJ0h0NZoe2Pxsd1M6ouTSctkQC4HID4A2ZNB+B g/y/8XyfqE15Zxw6UFba+K/C0Z2t1qFX0RHewYU4YdpM+xxrpOHSkRjkZDeJnzVl6w6C/E d1NjINFT0erdnhEk2nxdFMt9YJJH4K4HDcXlDinM5ofeAowI04ZpKVWkahw3l2rlGSWgON AXmJDEWvFtn0iWYjWiBJHNOIkEyTKFNy0+wf0UiHuangwiib3sNueuhQA45g X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 23 Sep 2026 04:42:30 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1790152570; bh=AYhwDU6BvLGNdribbs1ZOhjpC/A9GI9/P3ZsvG0M3JQ=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=MLYEEzTRksQ3YNSxHJmhxsukd26fGH6hUv2b0qCWzAQlx7jU7hSXn9+pBk0XeTZn2 bKD7DiiAj1b8fDqauE6CSkeZOs1nIQZIOZFIFfOGIL0BEUvqj7hsUnnXNtplDovheU r9FFPrzTIu6IpJjwBzptB7/aAy/Gf24UYrSVCFOdQq3z3pXBJ4EEDTsJM2qVqaFRZt oBnWFF8iN2rMXB/9nPD3MTw6I4C6IRjTyd4i+rjKoCXLAKzEw4lMm7CfgwQJRhQKRA YJvIIlUn4RjyeGtg8DgTf6sfj/+25kMCMXn02BqdAXF7towZ5rXuQusuTdgD1UlpEr m6JFEcytYvmCA== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id A6FB0B00096; Wed, 23 Sep 2026 10:36:10 +0200 (CEST) Date: Wed, 23 Sep 2026 10:36:10 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Chao Li Cc: Devrim =?utf-8?B?R8O8bmTDvHo=?= , PostgreSQL Hackers Subject: Re: [PATCH] Misleading error message for REPACK USING INDEX on shared catalogs 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-Sep-23, Chao Li wrote: > > On Sep 23, 2026, at 06:05, Devrim Gündüz wrote: > > While poking at REPACK on v19 beta4 for my Chicago meetup talk, I > > noticed that the error message emitted when trying to REPACK a shared > > catalog with USING INDEX is misleading, since it makes it sound like > > REPACK itself is disallowed on shared catalogs, when only the USING > > INDEX form is: > > > > postgres=# REPACK pg_authid USING INDEX pg_authid_oid_index; > > ERROR: cannot execute REPACK on a shared catalog > > > > postgres=# REPACK pg_authid; > > REPACK Good catch. > > Attached patch tweaks the message to name USING INDEX specifically, > > and also includes the related comment in repack.c to an errdetail() so > > it's visible to the user, not just to someone reading the source: > > > > ERROR: cannot execute REPACK USING INDEX on a shared catalog > > DETAIL: Marking an index as clustered on a shared catalog would > > only take effect in the current database. Looks reasonable. > But I have concern with the change. cluster_rel() is used by both > REPACK and CLUSTER commands, but CLUSTER command, the syntax is > CLUSTER … USING index-name. Yeah, I think we should keep the "cannot execute %s on a shared catalog" string as is, and make the SQL bit interpolated there be REPACK USING INDEX or CLUSTER according to stmt->cmd; one because CLUSTER also allows the older CLUSTER ON syntax AFAIR, but also you can't do CLUSTER with no index. The added errdetail() bit looks good to me. This is not a new omission: the older cluster.c code also lacked it. (The errmsg was "cannot cluster a shared catalog".) -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/