Re: Remove psql's -W option

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com>
Cc: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, David Fetter <david(at)fetter(dot)org>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Remove psql's -W option
Date: 2018-07-22 00:03:37
Message-ID: 27600.1532217817@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com> writes:
> On 22/07/18 00:41, Fabien COELHO wrote:
>> What is the rational?

> It's first on our list of things not to do:
> https://wiki.postgresql.org/wiki/Don't_Do_This#Don.27t_use_psql_-W_or_--password

As I recall, when this has been discussed in the past, people objected
because they didn't like either (1) the extra server process fork and/or
network round trip caused when a password is needed, or (2) the server
log entry that gets generated about client disconnecting without supplying
a password. (We don't log anything about it normally, but I'm not sure
that that's always true when using PAM, LDAP, connection poolers, etc.)
While those are surely niche concerns, it's not really apparent to me
what we gain by breaking them.

A possible positive reason for removing the option would be if we could
clean up this mess:
https://www.postgresql.org/message-id/E1egDgC-000302-FN@gemulon.postgresql.org
But no fair citing that argument without presenting an actual clean-up
patch, because it's not obvious how much cleaner we could make it.

BTW, all of our client programs have this switch, so if we did agree
to remove it, this patch doesn't go nearly far enough.

regards, tom lane

PS: I found some interesting back-story here:
https://www.postgresql.org/message-id/flat/200712091148.54294.xzilla%40users.sourceforge.net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrei Korigodski 2018-07-22 00:39:39 pgbench: improve --help and --version parsing
Previous Message Tom Lane 2018-07-21 23:20:08 Re: Non-portable shell code in pg_upgrade tap tests