Re: Installed. Now what? - Mailing list pgsql-general

From Phoenix Kiula
Subject Re: Installed. Now what?
Date
Msg-id CAFWfU=urrweq9ofTJQyh3-_0xwJ4FNyG-sbk+H4soEKTcjWy=w@mail.gmail.com
Whole thread Raw
In response to Re: Installed. Now what?  (Adrian Klaver <adrian.klaver@gmail.com>)
Responses Re: Installed. Now what?  (Phoenix Kiula <phoenix.kiula@gmail.com>)
Re: Installed. Now what?  (Adrian Klaver <adrian.klaver@gmail.com>)
List pgsql-general
On Sun, Nov 20, 2011 at 2:13 AM, Adrian Klaver <adrian.klaver@gmail.com> wrote:
>
> http://pgbouncer.projects.postgresql.org/doc/config.html
>
> I have never used pgbouncer, but from above it would seem you need to set up a
> [databases] section to tie pgbouncer to the Postgres server.
> See:
> SECTION [databases]



Thanks Adrian. All this is done.

The config file link just describes what each option means. There's
zero information about how to actually tweak or wisely set the stuff!
:(

Anyway, with half a day of googling or so, and looking at sundry blogs
and such, I have pgbouncer running on port 6432. PG runs on the usual
5432.

I still keep seeing the "Sorry, too many clients already" error.

From my PHP code, what line should I use? This does NOT work:

  $link   = pg_connect("host=localhost dbname=$db user=$user password=$pass");

If I remove the port number, it works. Is it then connecting straight
to the DB? What am I missing? Pgbouncer is working, but not accepting
PHP pg_connect() call. The username and password are correct for sure.

Any thoughts?

pgsql-general by date:

Previous
From: "Andrus"
Date:
Subject: Re: How to install latest stable postgresql on Debian
Next
From: Phoenix Kiula
Date:
Subject: Re: Installed. Now what?