Re: [PATCH] Don't call ereport(ERROR) from recovery target GUC assign hooks - Mailing list pgsql-hackers

From JoongHyuk Shin
Subject Re: [PATCH] Don't call ereport(ERROR) from recovery target GUC assign hooks
Date
Msg-id CACSdjfM=ogaekejJ7mQkq50gRSeGxUCm9hYkgxpYQchp9SZCHg@mail.gmail.com
Whole thread
In response to Re: [PATCH] Don't call ereport(ERROR) from recovery target GUC assign hooks  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Mon, Jun 29, 2026 at 2:48 PM Michael Paquier <michael@paquier.xyz> wrote:
> pg_settings is just one way to look at these values. We have also
> SHOW and other interfaces. I would keep the errdetail() with your
> first sentence, make the errhint the second sentence of the errdetail().

I split it along the message style guide's line, factual information
in the detail and suggestions in the hint. The detail states the facts,
which targets are set, and the "see pg_settings" pointer is guidance
for tracking them down rather than a fact about the conflict,
so it went into the hint.
I'd keep it there rather than fold it into the detail.

SHOW does return the values, but I named pg_settings
specifically because it also reports where each parameter is set,
through its sourcefile and sourceline columns.
With several recovery_target* values possibly spread
across configuration files, finding where each one is set
is usually what it takes to resolve the conflict,
which is the part SHOW leaves out.

--
JH Shin

pgsql-hackers by date:

Previous
From: Ayush Tiwari
Date:
Subject: Re: GetBufferDescriptor() being called for local buffers from MarkBufferDirtyHint()
Next
From: Ayush Tiwari
Date:
Subject: Re: Remove the refint contrib module (for v20)