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

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, brown(at)fastmail(dot)com, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #13741: vacuumdb does not accept valid password
Date: 2015-11-02 19:26:26
Message-ID: 20151102192626.GG6104@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Michael Paquier wrote:
> On Mon, Nov 2, 2015 at 8:10 PM, Haribabu Kommi wrote:
> > Here I attached modified patch that gets the password from parent connection
> > if exists and use it for the child connection also.
>
> Meh? Why the parent connection? You could simply have the password as
> an argument of connectDatabase, per se the attached. That looks just
> more simple.

Thanks! This is almost there, but there's an important missing piece --
vacuumdb --all will ask you for a password for each database. I think
vacuum_one_database needs to receive a password from its caller too.

(Also, please use pg_strdup.)

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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Devrim GÜNDÜZ 2015-11-02 19:41:30 Re: BUG #13752: Incorrect RPM Version on 9.0.23 Release
Previous Message Tom Lane 2015-11-02 19:14:37 Re: BUG #13733: ~/.psql_history* corrupted

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-11-02 20:37:57 Re: [ADMIN] Replication slots and isolation levels
Previous Message Jim Nasby 2015-11-02 19:23:59 Re: Request: pg_cancel_backend variant that handles 'idle in transaction' sessions