Re: synchronous_standby_names parser discards errors

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: synchronous_standby_names parser discards errors
Date: 2025-07-24 18:14:18
Message-ID: 1686302.1753380858@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> Since Peter Eisentraut's commit
> 473a575e05979b4dbb28b3f2544f4ec8f184ce65 on January 25 of this year,
> attempting to set synchronous_standby_names to a value that doesn't
> parse results in a generic and uninformative error message:

Oops.

> Apparently, our tests do not exercise this parser's error cases. I
> looked into adding a test but I don't see a real easy place to add
> one. If we had testing for messages like "WAL archival cannot be
> enabled when \"wal_level\" is \"minimal\"" then it would make sense to
> test this kind of thing in the same place, but we don't. Because the
> setting is PGC_SIGHUP, we can't just include a SET command in the main
> regression tests, either. I don't want to spend the time to upgrade
> our testing infrastructure to catch future instances of this problem
> right now, and therefore propose to just commit this fix and move on.

Agreed, the cost/benefit ratio for creating a test case doesn't
seem attractive.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2025-07-24 18:14:47 Re: track generic and custom plans in pg_stat_statements
Previous Message Jeff Davis 2025-07-24 18:10:40 Re: Remaining dependency on setlocale()