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 1wSc7l-003II6-0Y for pgsql-hackers@arkaria.postgresql.org; Thu, 28 May 2026 14:54:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wSc7j-00CUaJ-0N for pgsql-hackers@arkaria.postgresql.org; Thu, 28 May 2026 14:54:16 +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 1wSc7i-00CUaA-1p for pgsql-hackers@lists.postgresql.org; Thu, 28 May 2026 14:54:15 +0000 Received: from fout-b7-smtp.messagingengine.com ([202.12.124.150]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wSc7h-00000001BHe-2gWK for pgsql-hackers@lists.postgresql.org; Thu, 28 May 2026 14:54:14 +0000 Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.stl.internal (Postfix) with ESMTP id 4931C1D00053; Thu, 28 May 2026 10:54:12 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Thu, 28 May 2026 10:54:12 -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=1779980052; x= 1780066452; bh=dLVV8/rrqB7rR0T+hQtt702G5S3t+rlrwigXNNHigMs=; b=D QVm2Hli7j6GwensbBtZ09+1yAlipFn+VzIlo5TkdWOMqpDFBzWh5ZqqutsaYA4qI B2RoxKUclOcq8/DiMS1dZyW+vrHo7juOvaHNjJ6z6GOt66Lrqj3A1tJx99yO+1Ky lamhl9SRAZkU15OV1e768rhUvqLlz+wZ7GZrG4PydpqFCrDF/gdyGvB9Cg6JQ7q5 eLtGT5bGrTbErPcncpbR2SigBv/L+0IWIerUKb+XEfEsOOYrqzo6q9gbXctDDeTR axTJYHCwSMU26Te1lO7yuotFl4preGhrjHYuNiLAjAmi5RreYMHHDR3Y6590rfAh OgbColXLxLwnLNAsc0yZQ== 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=1779980052; x=1780066452; bh=d LVV8/rrqB7rR0T+hQtt702G5S3t+rlrwigXNNHigMs=; b=j5kT6sb+3hm8I0zSE QwfhtwvWZKs4P5eyHyJIrItvVodkqIkSirfZ48cXidoWMKjx+o9DtLZtFgYiqO4w Zf6CP6lAfNHepy7SB5XFFFYLd1o+/HmdXXVVwZFA2iFUQNaYOYBxYtgLl3gppfC3 BGBSv9xOYkmi4cBsAkIwnV3IJRJ8E+Lb0mXM9dBaUF0SBSZLMCKYwt9012Ferm4H hFZVIkUcyor6nGGK/wAR34wlE6rbFEBdf1O/1OAdYNKwxxGp+uWfex5ltjAf7E3T jZ45AvlpFdd2E0EovpnY5vZxPxrAAVgFlwknXxBVOnnuD+3+DlM86yH70cPDPgRy Kz4/g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTEoxUQoJt1A80M22O/OLMX7FCV9OjcCMVTOE51gEy2vvLAXNzGrBXj8RiJ30Wtn9b UT8Pfr9qln2GIcChaT7jAkgD4DJB8MqlumoHZD/tsR8UDvZujGedThgl+7XKAQQ/Q2f76F jaPvN2ScyjETgvK+z1uKgM+X0k3MR4Gh3HtMhYj5PqgCV3a54XtQ+8CHjUCYq+vqGJq1rg f3a5bKHvcz9t0+cts+vy1bj2HD6eKyGKRXpW9ojSdY9cF/+1nbZdbw5INxYlLzSlYtxupz jWTnghEcXb6Dif575qw8WbMMGr9TVarpmssSygERb5pG0vuz2U/N5qdAwTxZk8VyVUswZ/ BzNfSQcCDimlC4ZuEcQh85oserO53HvAPqP/8EH+PLfPGr5rNIkz0Yts3lW8rYpfEsAwR+ 09WreQuZF0SCK2EG+zkHz1/gAP9l4lMW7AxQ3ooRIQ1BnELSYZYPRa1NaBK9YvD4EnSTOP m674AMisz5ZYVeiB4dmHMXtu0HJsyWRIP4/YRfAnkpwifXO2jygk0mVydV+0vjvw08/N30 zw0oZnoCg7/1GCUbTOXBJAwgI0cVmp7NceW70OOn1VPoA71doJ9a8XK/OirLiEIPAI0nGY zMcgJ2rrhHi0LvH0Zfzy7nFq0pTHTWYhbHlhhU93tIvlp91yo2hzdyUtkvvw X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 28 May 2026 10:54:11 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1779980047; bh=yelhhUUmICaqO78jZa4P7gwGd03xZNnF1+kQCyxVz0k=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=PUwkW8SyN8KjPIdbR2hENLvzBbN3K1EaxYAB/XKpT84Yt6dC4b8F+0erVQBDs+FbS 6xVjMCWMvalTHQ7740s/XvrC7rjFq1wTQTm6C6DGAeVqWuuer4RKhRuqSIIa5ELM2k rhPVlqf/1hci8Xog+00YtiVgrO/1cvex7Z6IlL11Rykcpj4pfRLI0YMLn9Tc5GF0so 0JoavGQJbkXkgW205kZSist1wYUH9/nJKLztQhcnXfmTBsb5GmAYWT+QC14/+Fn4JC wVil8UuqUwA+zHK/cmn4H/8M/PQYrpccwmejJ18vJ45GU2jYBIJozwqJYieQ0ztDOS 53jw3DobXI2Ow== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id BB63CB00633; Thu, 28 May 2026 16:54:07 +0200 (CEST) Date: Thu, 28 May 2026 16:54:07 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Chao Li Cc: Baji Shaik , pgsql-hackers@lists.postgresql.org Subject: Re: [PATCH] Improve REPACK (CONCURRENTLY) error messages for unsupported configurations Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <172EB2C2-DE11-4E5B-B115-38A7AD3B6A3D@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-May-27, Chao Li wrote: > > On May 27, 2026, at 11:06, Baji Shaik wrote: > > > > 0001 -- When wal_level < replica, REPACK (CONCURRENTLY) currently > > surfaces generic "replication slots ... wal_level" error > > from CheckSlotRequirements(), with a CONTEXT line referring > > to an internal worker. Add an upfront check that reports a > > REPACK-specific error. > > LGTM Pushed this one earlier. I changed the errcode though, because in my mind "object" is a database object, and the server configuration is not an object. So I used INVALID_PARAMETER_VALUE instead. I also don't think it makes sense to say "cannot repack table X", so the user leaves thinking they could repack table Y instead. The whole point being that you cannot vacuum _any_ tables. So I made the errmsg() say that. > When I was working on 832e220d99a, I actually considered for more > detailed error messages, but I ended up giving up. I think we should > be careful about adding more branches here unless the existing message > is causing significant confusion in practice. > > So, I personally don’t like 0002. I'll give this a look after some icecream. > > 0003 -- Four ereport(ERROR) calls in the REPACK CONCURRENTLY code > > path lack errcode() and default to ERRCODE_INTERNAL_ERROR. > > Add appropriate errcodes; in particular, the > > apply_concurrent_update/delete failures map cleanly to > > ERRCODE_T_R_SERIALIZATION_FAILURE. Also pushed, with additional editorialization. I have recollections of out message policy saying something about "could not do X" instead of "failed to do X", so I changed it that way. (But I couldn't find that in the style guide.) -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/