Re: [PATCH] HINT: pg_hba.conf changed since last config reload

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] HINT: pg_hba.conf changed since last config reload
Date: 2014-11-06 22:46:42
Message-ID: 545BFA52.8080903@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10/16/14 11:34 PM, Craig Ringer wrote:
> psql: FATAL: Peer authentication failed for user "fred"
> HINT: See the server error log for additional information.

I think this is wrong for many reasons.

I have never seen an authentication system that responds with, hey, what
you just did didn't get you in, but the administrators are currently in
the process of making a configuration change, so why don't you check
that out.

We don't know whether the user has access to the server log. They
probably don't. Also, it is vastly more likely that the user really
doesn't have access in the way they chose, so throwing in irrelevant
hints will be distracting.

Moreover, it will be confusing to regular users if this message
sometimes shows up and sometimes doesn't, independent of their own state
and actions.

Finally, the fact that a configuration change is in progress is
privileged information. Unprivileged users can deduct from the presence
of this message that administrators are doing something, and possibly
that they have done something wrong.

I think it's fine to log a message in the server log if the pg_hba.conf
file needs reloading. But the client shouldn't know about this at all.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2014-11-06 23:30:51 Re: split builtins.h to quote.h
Previous Message Andrew Dunstan 2014-11-06 22:38:07 Re: json, jsonb, and casts