On 10/31/22 10:31 AM, Bryn Llewellyn wrote:
>> adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com> wrote:
>>
>>> bryn@yugabyte.com <mailto:ryn@yugabyte.com> wrote:
>>>
>>> This, on the other hand:
>>>
>>> psql -d postgres -U 'clstr$mgr'
>>>
>>> calls for "local", "peer" authentication as so it does NOT require a
>>> password. That would be enough for me. But, naturally, and now that
>>> it's working. I prefer the Peter-inspired bare "psql".
>>
>> Personally, I use longer forms like above as a form of explicit is
>> better then implicit. There are no end of posts to this list where the
>> issue was someone or something had changed a 'hidden' value in a env
>> variable or conf file could not connect or connected to wrong cluster
>> and/or database.
>
> This thinking extends, of course, to:
>
> psql -d postgres -U 'postgres'
>
> having logged in as the O/S user "postgres". (And here, I can simply
> "set role" to "clstr$mgr" when I need to without exiting one session,
> logging in as a different O/S user, and then starting a new session.)
This implies that the only auth method you will be using is peer, is
that correct?
This also means that the only connections to the cluster will be done as
local, is that correct?
>
> But when I'm working interactively, I might well allow myself to type
> the bare minimum, on the fly, that gets the result.
--
Adrian Klaver
adrian.klaver@aklaver.com