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

From Haribabu Kommi
Subject Re: BUG #13741: vacuumdb does not accept valid password
Date
Msg-id CAJrrPGeXuav-OYjJYKwSaLt+aOU+emH4a5XZS3XfMHNfanUmnw@mail.gmail.com
Whole thread Raw
In response to Re: BUG #13741: vacuumdb does not accept valid password  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: BUG #13741: vacuumdb does not accept valid password  (Haribabu Kommi <kommi.haribabu@gmail.com>)
Re: BUG #13741: vacuumdb does not accept valid password  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-bugs
On Wed, Nov 4, 2015 at 12:06 AM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> On Tue, Nov 3, 2015 at 6:10 AM, Haribabu Kommi <kommi.haribabu@gmail.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.


Regards,
Hari Babu
Fujitsu Australia

pgsql-bugs by date:

Previous
From: ryan.vilim@gmail.com
Date:
Subject: BUG #13754: Postgres possibly accepts a typo as valid input
Next
From: Haribabu Kommi
Date:
Subject: Re: BUG #13741: vacuumdb does not accept valid password