From: Claus Herwig <c.herwig@link-m.de>
To: pgsql-admin@postgresql.org
Subject: Some questions about postgres backend connections
Date: Sun, 10 Jun 2001 18:53:35 +0200
Message-ID: <3B23A60F.57B920E9@link-m.de> (raw)
Hello out there!
After installing PostgreSQL 7.1.2 (debian Linux 2.2.19) I've a whole bunch of
questions about connection configuration ;-)
1. Does Postgres for its tcp-socket make use of the hosts.access mechanism? If
yes, whats the correct service name in hosts.allow|deny? I tried some, but it
seems it doesn't work...
2. Can I use PAM-authentication for restricting the access to databases,
tables etc. Or is it necessary to manually put all unix-users in the pg_user
table also (with additional passwords and therefore a lot of administration
overhead ;-)
3. Is there a possible problem connecting to the postgres unix domain socket
with PHP4 (4.0.3pl1 on apache 1.3.9)?
If (in the php-file) I do a
$link = pg_connect("dbname=template1");
I get (in syslog)
apache: PHP Warning: Unable to connect to PostgreSQL server:
connectDB() -- connect() failed: Connection refused Is the postmaster
running at
'localhost' and accepting connections on Unix socket '5432'? in
/var/www/intern/phpPgAdmin/test.php on line 6
Of course, the postmaster is running and psql works fine. The socket itself
seems alright:
srwxrwxrwx 1 pgr pgr 0 Jun 10 18:22 tmp/.s.PGSQL.5432
-rw------- 1 pgr pgr 21 Jun 10 18:22
tmp/.s.PGSQL.5432.lock
If I do the same thing with the tcp-socket
$link = pg_connect("host=localhost port=5432 dbname=template1");
everything is ok...
Any suggestions?
Thanks a lot,
Claus Herwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: c.herwig@link-m.de
Subject: Re: Some questions about postgres backend connections
In-Reply-To: <3B23A60F.57B920E9@link-m.de>
References: <3B23A60F.57B920E9@link-m.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox