Re: [PATCH] pg_autovacuum commandline password hiding. - Mailing list pgsql-patches

From Tom Lane
Subject Re: [PATCH] pg_autovacuum commandline password hiding.
Date
Msg-id 20752.1116946936@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] pg_autovacuum commandline password hiding.  ("Dave Page" <dpage@vale-housing.co.uk>)
Responses Re: [PATCH] pg_autovacuum commandline password hiding.
Re: [PATCH] pg_autovacuum commandline password hiding.
List pgsql-patches
"Dave Page" <dpage@vale-housing.co.uk> writes:
>> Which is exactly why we don't (and won't) provide such a switch.

> Err, yes we do:

Um, sorry, I totally misread Ian's patch as a proposal that we add a
password switch (I hate unidiffs ;-)).

I would argue actually that this switch is a horrible idea and we
must take it out entirely.  The method Ian proposes for hiding the
password after reading it is certainly not portable in the slightest,
and even if we could make it work on all platforms (which we can't)
I don't think it would be good enough, because there would still be
a window where the superuser password was exposed to view before
we could wipe it out.

psql, pg_dump, etc allow password specification from stdin and from
.pgpass, never on the command line.  There is a reason why they are all
designed like that.  pg_autovacuum hasn't been studied carefully enough
I guess, because we should never have let a security hole like this get
by us.

            regards, tom lane

pgsql-patches by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: plperl strict mode
Next
From: Andrew Dunstan
Date:
Subject: Re: [PATCH] pg_autovacuum commandline password hiding.