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 1wbHLM-002QVX-1u for pgsql-hackers@arkaria.postgresql.org; Sun, 21 Jun 2026 12:32:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wbHLL-002wi5-0W for pgsql-hackers@arkaria.postgresql.org; Sun, 21 Jun 2026 12:32:07 +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 1wbHLK-002whx-1G for pgsql-hackers@lists.postgresql.org; Sun, 21 Jun 2026 12:32:06 +0000 Received: from fhigh-a8-smtp.messagingengine.com ([103.168.172.159]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wbHLH-00000001alN-0RGs for pgsql-hackers@lists.postgresql.org; Sun, 21 Jun 2026 12:32:06 +0000 Received: from phl-compute-11.internal (phl-compute-11.internal [10.202.2.51]) by mailfhigh.phl.internal (Postfix) with ESMTP id 527C214000FC; Sun, 21 Jun 2026 08:32:00 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Sun, 21 Jun 2026 08:32:00 -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=1782045120; x= 1782131520; bh=aCisqKQ7PFAPxjC12wK4megVvB8yrAmFJthnDD0IFoY=; b=H Od1CdLOuj1swl3suj3Kb/YnhHonTcMQ5nL2u+lYX1veaiB8si4VaS5fz8CL4Qzvt tH/tf7nqHlL9FRVOyxGbyYfefnvttjQDe9P8GHFx1ZcqmaA+Flb59UqthF0eRnUk jhCM0e9ZBF1MccO0ADOyPFLjRH/sbIo6+4NOav+r8BhAQo7/bX4cpc1gdb67CsGV vZx9pDKAIEwO1jGO24b7qkUURYsRLGdmSucW+jBggtjD8EpoFA68vviENhAcpqra Wl2fr53TI2umXGvdWl+OCK6uwAMOYXQB2OdZ3gg4HyXqDHjrp7zqaf8yDkMJweUI rIcxIqnvbvqRaUJhd/Y/g== 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=1782045120; x=1782131520; bh=a CisqKQ7PFAPxjC12wK4megVvB8yrAmFJthnDD0IFoY=; b=QR/IcvjTNEXZQfzZ+ 3SNYt+JRBIlFz7zknkgpyNaxuHgU6TWroJEeBwLPMhkiq9yeOl6pAtwtC2Sw7yXL MqOU+EuU24zEzXc3CJ3aCx6gqHghaueX2GZqZWpqfQm6In7zx/VY6y5FAUdXuQjs /mJuGDsMtZ96a37BJ4r/2TXsbvCDWr+ACd0eaqJwPShqZrFjPyNfDlI2555zxVFB Nx6Ex5/WPv2fkRbuX284RGhK5PHbfJv1tl//vOd0GuhoTUJ83mX6J14qwxYeTmO/ nAa20CQiqWmo7Y0YAacw50afwhPkCTIopKo93tYEWILnGIS99adY0ZN1KijSPdxr qRNpQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTFdHiewXkxIk592JqBqIq+S2kTnKlcZPj2hfGjMchHjDwC2qLwrkaB+LWwc4YJgc2 vCe07aFkbVAEjR3904bNVp+i24kH0eLUHulJZSYAKlg24OuFIeK0AnaoNPCMie4TBc0Jz0 i7IcAR3epDf+r6YjppyU998pK8j2kKgLjAP6ivnkxPvdJGaTw93kCOMS9vd1K3v/5s9x0o fC23HFND/h5Vfla/JMEQGtJPFKRdEQY9kyRa9bEEBbmJ/ZhgAvzoA4Bx2PM6sqvQzg+CbU vjN1gHJNuwxYBG9zwHw2KKroko/u9/SgRJMhFyupKyCUq25gbHXLoB1Jtbmss1JkNsdgEn YrsF6QR3PKnW7HqV45ApgVnydV6ARvBhB2pnHUaZ6qpGuJaMJrf0RbDYB8954vPJQC3fHs akgPeUb7TwLX7DvLrOBaFoJsHsXcxqDr9IEs/Tgxaar2mD4OyPlAzS9ThamJVemraRUQGB AI61i/UNSuDs4JndXArE/rXJzVxAqsbkBn5oMncW+hS4r204gD04e0ZZKso6HrAr7e+ezg /29NdgvwIppSlfQOMQm3Gy/+j3AJNSxYTsYsdGybNxDWbOdjI7CFTOEkTmQJH7/N+Cq45r 4xBAn05FWz0Qh0LJhitmQKFfrnVGca3cNN8equh+vQeNJEeW/CLLjshPK0HA X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 21 Jun 2026 08:31:59 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1782045115; bh=e40NOGcradcswv9dW+DB8EFyErz6ZqlW5omfQDl34H4=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=BP/506sNJU8ktdRifdQiqG6tOJEPJ1zg5DU3mtf72rH3cXkv6/mfIpemybCBWtGmH 7Xh6Sg7hjU+ZRDm+dgM3anDVu4dzhT3y92z7TYuADGiMlZ9sH26C01v5ow3tKunzSL 2eZReyyUeUOWmA0vUsATohSs5kbUIHKuKxDFxN4pSLHoDniBGW9z7EDjfc4QAl6Z0g gLPpJlsBhs2LOTQi5SMnywTb4njCqpba7+frOzXzVnzC5Wt6s8wyq2+LK+lz2Y34Nd 8XzRErnfoPc3ydm9Yx/3tJNB6z5F2QALxA2dmu3yRVgZtg2cgATzcxm37w4oRZlryx PQFL6rQrLE4mA== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id 5855AB00692; Sun, 21 Jun 2026 14:31:55 +0200 (CEST) Date: Sun, 21 Jun 2026 14:31:55 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: JoongHyuk Shin Cc: Scott Ray , Fujii Masao , Michael Paquier , pgsql-hackers@lists.postgresql.org Subject: Re: [PATCH] Don't call ereport(ERROR) from recovery target GUC assign hooks 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 Hello, On 2026-Jun-21, JoongHyuk Shin wrote: > The errdetail now lists which recovery_target_* parameters are actually set, > instead of the full candidate list. > This follows Scott's idea to surface the set targets; > following Álvaro, the values are dropped > and a new errhint points to pg_settings for them and their sources. > > I kept the "which ones are set" list in errdetail rather than errhint, > it states the current configuration, which reads as detail, > while the errhint carries the actionable pg_settings pointer. Please see https://postgr.es/c/3692a622d3fd for more on translatable message construction. You should end up with a translatable string in a _() call like _(", \"%s\"") and the GUC names in a separate string in each case. Maybe you can make this a local macro to avoid repetitive coding, #define considerAndComplainAboutGUC(gucname, buf) \ do { \ val = GetConfigOption(gucname, false, false); \ if (val[0] != '\0') \ { \ ntargets++; \ if (buf.len == 0) \ appendStringInfoString(&buf, _("\"%s\""), gucname); \ else \ appendStringInfoString(&buf, _(", \"%s\""), gucname); \ } \ } while (0) considerAndComplainAboutGUC("recovery_target", buf); considerAndComplainAboutGUC("recovery_target_lsn", buf); and so on. (Of course, you should choose a less stupid macro name, but you get my meaning.) -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "... In accounting terms this makes perfect sense. To rational humans, it is insane. Welcome to IBM." (Robert X. Cringely) https://www.cringely.com/2015/06/03/autodesks-john-walker-explained-hp-and-ibm-in-1991/