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

From: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
To: brown(at)fastmail(dot)com
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #13741: vacuumdb does not accept valid password
Date: 2015-10-28 05:07:20
Message-ID: CAJrrPGeK5BLEpEgfApDN64aKyH1akm+GLxvmcFK-4dvSuF=p-g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Wed, Oct 28, 2015 at 2:53 PM, Haribabu Kommi
<kommi(dot)haribabu(at)gmail(dot)com> wrote:
> On Wed, Oct 28, 2015 at 6:39 AM, <brown(at)fastmail(dot)com> wrote:
>> The following bug has been logged on the website:
>>
>> Bug reference: 13741
>> Logged by: Eric Brown
>> Email address: brown(at)fastmail(dot)com
>> PostgreSQL version: 9.5beta1
>> Operating system: CentOS 6.6
>> Description:
>>
>> I am trying to vacuum a database from a remote computer. It appears that
>> vacuumdb is not accepting my password, though psql connects just fine.
>>
>>______
>> browne1(at)reslin3 ~/Desktop> vacuumdb -z -j 24 -h reslin1.enhnet.org -p 5433
>> 127
>> vacuumdb: vacuuming database "browne1"
>> Password:
>> Password:
>> Password:
>> vacuumdb: could not connect to database browne1: FATAL: password
>> authentication failed for user "browne1"
>> browne1(at)reslin3 ~/Desktop> psql -h reslin1.enhnet.org -p 5433
>> 1
>> Password:
>> psql (9.5beta1)
>> Type "help" for help.
>>
>> browne1=#
>> ______
>
> No. vacuumdb is accepting your password correctly. But you gave the number
> of client connections as 24, to connect all these 24 clients to the
> database, it is requesting
> the password to enter again.
>
> you can try with vacuumb -z -j2 to verify the same.
>
> I feel we need to accept the password once and reuse it for all client
> connections.
> Provided working password can be returned for that database.

Here I attached a patch that saves the password provided by the user
from the connectDatabase function and reuse it for connecting all clients
to the same database.

Regards,
Hari Babu
Fujitsu Australia

Attachment Content-Type Size
reuse_password_for_vacuum_db_v1.patch application/octet-stream 10.2 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message roland.otta 2015-10-28 07:00:30 BUG #13742: postgres deletes needed files in pg_clog
Previous Message Haribabu Kommi 2015-10-28 03:53:19 Re: BUG #13741: vacuumdb does not accept valid password

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2015-10-28 06:05:39 Re: Disabling START TRANSACTION for a SuperUser
Previous Message Amit Kapila 2015-10-28 03:58:47 Re: Freeze avoidance of very large table.