From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Stephen Davies <sdavies(at)sdc(dot)com(dot)au> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: psql connection issue |
Date: | 2014-10-08 04:02:10 |
Message-ID: | 3484.1412740930@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Stephen Davies <sdavies(at)sdc(dot)com(dot)au> writes:
> I am in the process of migrating a bunch of databases and associated CGI
> scripts from 9.1.4 to 9.3 (and from 32-bit to 64-bit).
> The database migration has been successful but I have an issue with psql
> connections from CGI scripts.
> I can connect to the 9.3 server locally with psql from the command line, with
> psql from other boxes on the LAN via TCP, via JDBC from programs and servlets
> but cannot connect locally via CGI.
> If I run any of the CGI scripts from the command line they work but when
> invoked by Apache, they fail with the usual question as to whether anything is
> listening on socket /tmp/.s.PGSQL.5432.
Some Linux variants think it improves security to run daemons like apache
in a context where what the daemon sees as /tmp has been mapped somewhere
else.
If you're running one of these platforms, the Postgres server and libpq
distributed by the vendor will have been hacked to cope, typically by
agreeing that the socket location is something like /var/run/postgresql/
rather than /tmp. I'm guessing your 9.3 installation was self-built
and hasn't been configured that way.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Ian Barwick | 2014-10-08 04:05:16 | Re: psql connection issue |
Previous Message | Stephen Davies | 2014-10-08 03:51:51 | psql connection issue |