Re: add the source of param misconfigurations to error messages

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jordan Deitch <jd(at)rsa(dot)pub>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: add the source of param misconfigurations to error messages
Date: 2018-11-13 22:33:01
Message-ID: 22490.1542148381@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jordan Deitch <jd(at)rsa(dot)pub> writes:
> $ postgres --config-file="/etc/postgresql/10/main/postgresql.conf"
> can fail with the following error:
> postgres: superuser_reserved_connections must be less than max_connections

> This is due to the addition of the postgresql.auto.conf params.
> Would the community welcome a patch whereby this detail in contained in the error?

Seems to me it'd result in an impossibly unwieldy message, especially
once you realize you might have to deal with other value sources than
files. Adhering to the translatability guidelines (ie, "don't construct
messages out of parts") would be problematic for that too.

We already have fairly substantial support for diagnosing such mistakes
through the pg_file_settings view, though admittedly if you don't use
that *before* restarting the server, it does not help with this.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-11-13 22:33:30 Re: [PATCH] Pass COPT and PROFILE to CXXFLAGS as well
Previous Message Tom Lane 2018-11-13 22:27:17 Re: [PATCH] Pass COPT and PROFILE to CXXFLAGS as well