Re: BUG #13741: vacuumdb does not accept valid password

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: BUG #13741: vacuumdb does not accept valid password
Дата
Msg-id 20151112215841.GS614468@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: BUG #13741: vacuumdb does not accept valid password  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #13741: vacuumdb does not accept valid password
Список pgsql-bugs
Tom Lane wrote:
> 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.

Yes, it is ugly.

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

I had the same comment, but it turns out that free and strdup must be
used instead because sprompt.c uses malloc in the equivalent places; and
we can't use pg_malloc there because it's in src/port which isn't
allowed to use fe_memutils.  We would have to move it from src/port to
src/common first.

> 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.

Hm, we can try that.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #13741: vacuumdb does not accept valid password
Следующее
От: Gavin Flower
Дата:
Сообщение: Re: BUG #13773: BigInt column right padding zero