Re: Installed. Now what?

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: Phoenix Kiula <phoenix(dot)kiula(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgbouncer-general(at)pgfoundry(dot)org
Subject: Re: Installed. Now what?
Date: 2011-11-20 00:08:56
Message-ID: 201111191608.57311.adrian.klaver@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Saturday, November 19, 2011 2:44:04 pm Phoenix Kiula wrote:
> On Sun, Nov 20, 2011 at 3:35 AM, Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
wrote:
> > Well in the .ini file you posted there is no [databases] section. From
> > what I read lack of one would explain the problem you are seeing.
>
> Yes. Because that's private to post on a public mailing list like this.
>
> Here's my INI file below, with the private DB name etc sanitizes --
> and trust me, all info related to password and ports is absolutely
> correctly entered. Both pgbouncer and postgresql are live and running.
>
> Just that pg_connect() function in PHP is not working if I point is to
> pgbouncer's port instead of the direct postgresql port.

I would first work on establishing that psql works.

From a previous post:
"
Also, this does NOT work:

psql snipurl -E "snipurl_snipurl" -p 6543

Shows me this error:

psql: ERROR: no working server connection

How come? The pgbouncer is on!
"

Not sure what platform you are on but:
http://www.postgresql.org/docs/9.0/interactive/app-psql.html
"Not all of these options are required; there are useful defaults. If you omit
the host name, psql will connect via a Unix-domain socket to a server on the
local host, or via TCP/IP to localhost on machines that don't have Unix-domain
sockets"

You have pgbouncer listening on 127.0.0.1. In your psql connection string you
are not specifying a host, so if you are on a Unix platform it is trying to
connect to a socket which would account for the error. I found when working with
new software explicit is better than implicit. Eliminate possible sources of
error by fully qualifying everything.

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Phoenix Kiula 2011-11-20 02:28:48 Re: Logging not working
Previous Message Scott Marlowe 2011-11-19 22:57:43 Re: Is it ever necessary to vacuum a table that only gets inserts/updates?