Search Postgresql Archives

Re: Installed. Now what?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dne 21.11.2011 01:39, Phoenix Kiula napsal(a):
> On Mon, Nov 21, 2011 at 4:13 AM, Adrian Klaver <adrian.klaver@xxxxxxxxx> wrote:
>> On Sunday, November 20, 2011 3:56:18 am Phoenix Kiula wrote:
>>
>>>> Any ideas?
>>>
>>> Just to add, the connection string I try for pgbouncer is EXACTLY the
>>> same as the one I use to connect directly to PG, but I add the port
>>> number.
>>
>>
>> That may be the problem. The Postgres server and pgbouncer are not the same
>> thing. Visual aids:
>>
>> Client          -->             pgbouncer          -->       Postgres server
>>
>> Client credentials        pgbouncer auth               Postgres auth
>>
>>                                   auth file                         Pg pg_shadow
> 
> 
> 
> Thanks for this.
> 
> (1) Do I need to create a new user for Pgbouncer then?
> 
> (2) What info goes in the "auth_file" -- the Pgbouncer user/password
> or the Postgres user/password?

Those users are completely different.

1) There's a user/password used to connect to the pgbouncer. This is the
user specified in the auth_file - how exactly is it interpreted, depends
on the auth_type value. With "trust", just an existence of the user name
is verified. With other auth types, the password is verified too.

So this works perfectly fine with auth_type=trust

"tomas" ""

and this works with auth_type=plain (with actual value of my password)

"tomas" "mypassword"

I could set auth_type=md5 and put there MD5 hash of "mypassword"

"tomas" "34819d7beeabb9260a5c854bc85b3e44"


2) Once you're connected to the pgbouncer, it has to handle you a
database connection. This has nothing to do with auth_file, the username
and password are encoded into the connection string (in the [databases]
section of the ini file).

[databases]
MYDB  = host=127.0.0.1 dbname=MYDB user=MYUSER password=MYPASSWORD
client_encoding=utf8 port=5432

> In any case, I have kept both the user name and passwords the same for
> now. But I have not created anything for Pgbouncer specifically other
> than to put the info in auth_file. Have I missed a step?

I'm really confused what the current config is. Do you have "password="
in the connection string (in 'databases' section of the ini file)?

In the previous post I've recommended to use double quotes to enclose
the password - that does not work, sorry. You may use single quotes or
no quotes (if the password does not contain spaces etc.).

Tomas

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux