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

From: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(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-04 00:36:42
Message-ID: CAJrrPGetAZVhE=0YJY5idTYtSt2o1LCkkC9aQaw81kJg2RyWuw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Wed, Nov 4, 2015 at 11:24 AM, Haribabu Kommi
<kommi(dot)haribabu(at)gmail(dot)com> wrote:
> On Wed, Nov 4, 2015 at 12:06 AM, Michael Paquier
> <michael(dot)paquier(at)gmail(dot)com> wrote:
>> On Tue, Nov 3, 2015 at 6:10 AM, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com> wrote:
>>> Here I attached a separate patch to handle the reuse of password for
>>> vacuumdb -all
>>> case. The same behavior exists in all supported branches.
>>
>> Sure. Still you don't actually need a double pointer as you do. You
>> could just reuse the password from the connection obtained via
>> connectMaintenanceDatabase and pass the password from this connection
>> as the argument to vacuum_one_database. Something like the attached
>> seems more elegant IMO.
>
> Why I used a double pointer is to support the scenario like the following.
> - There is no password requirement for Postgres, template1 and
> maintenance db that is provided by the user.
> - But there is a password requirement for user databases.
> - If user doesn't provide the password during connection to
> Maintenance database, later it prompts for
> password while connecting to user database.
> - Without the double pointer, further on for every database, it
> prompts for the password and also
> the case of --analyze-in-stages prompts for password for the all the stages.

And one more thing, the vacuumdb password behavior is present in back branches
also, is it worth back patching the vacuumdb fix to all supported
branches and apply
the jobs connection fix only to master and 9.5?

Regards,
Hari Babu
Fujitsu Australia

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2015-11-04 02:16:18 Re: BUG #13741: vacuumdb does not accept valid password
Previous Message Haribabu Kommi 2015-11-04 00:24:12 Re: BUG #13741: vacuumdb does not accept valid password

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2015-11-04 01:21:58 Re: RFC/WIP: adding new configuration options to TOAST
Previous Message Haribabu Kommi 2015-11-04 00:24:12 Re: BUG #13741: vacuumdb does not accept valid password