Re: BUG #13741: vacuumdb does not accept valid password - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #13741: vacuumdb does not accept valid password
Date
Msg-id 21797.1447365082@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #13741: vacuumdb does not accept valid password  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: BUG #13741: vacuumdb does not accept valid password  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-bugs
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Thanks for the input.  I decided to push what we had because it's less
> invasive in terms of API definition.

I dunno, this might be easier for the callers that don't want password
re-use, but it seems quite horrid for ones that do.  The changes to
vacuumdb.c are, frankly, seriously ugly; and they require vacuumdb.c
to know a lot more than before about password handling.

Other notes are that the strdup() call should surely be pg_strdup(),
and the mix of free() and pg_free() is at best unsightly.

On the whole I don't think this was ready to push.

The place I was thinking we might end up was something like Fujii-san's
patch plus a new bool parameter "allow_password_reuse", which could be
passed as false in cases where the old behavior seems preferable.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: BUG #13741: vacuumdb does not accept valid password
Next
From: Alvaro Herrera
Date:
Subject: Re: BUG #13741: vacuumdb does not accept valid password