Re: Installed. Now what?

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Installed. Now what?
Дата
Msg-id 201111201213.30376.adrian.klaver@gmail.com
обсуждение исходный текст
Ответ на Re: Installed. Now what?  (Phoenix Kiula <phoenix.kiula@gmail.com>)
Ответы Re: Installed. Now what?  (Phoenix Kiula <phoenix.kiula@gmail.com>)
Список pgsql-general
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


The  authentication chain is

Client send credentials to pgbouncer.
pgbouncer checks against its list of approved users and method of
authentication.
If client passes that then pgbouncer tries to open connection to database
specified by client, using credentials listed in connection for that database in
the [databases] section of ini file.
If those credentials match those in Postgres server then a connection is
allowed.

There is nothing that says the users  admitted by pgbouncer have to be the same
as those admitted by Postgres.

From what you reporting you are authenticating to pgbouncer and not to Postgres.
This was pointed out upstream by Marko.  I would do a careful review of what
user you are connecting as, to each program.  Also when posting the log results
please specify which program they are coming from, takes out the guess work:)



>
> For Direct PG  (works) --
> pg_connect("host=localhost dbname=$db user=myuser password=mypass");
>
> For Pgbouncer  (does NOT work) --
> pg_connect("host=localhost dbname=$db port=6432 user=myuser
> password=mypass");
>
> Given that both PG and postgresql are alive and kicking on 5432 and
> 6432 ports respectively, as shown in the netstat output above, I
> wonder if the connection string is the problem.

--
Adrian Klaver
adrian.klaver@gmail.com

В списке pgsql-general по дате отправления:

Предыдущее
От: Bill Moran
Дата:
Сообщение: Re: Significant Digits in Floating Point Datatype
Следующее
От: Andreas 'ads' Scherbaum
Дата:
Сообщение: FOSDEM 2012 - PostgreSQL Devroom: Call for Speakers