Some questions about postgres backend connections

From: Claus Herwig <c(dot)herwig(at)link-m(dot)de>
To: pgsql-admin(at)postgresql(dot)org
Subject: Some questions about postgres backend connections
Date: 2001-06-10 16:53:35
Message-ID: 3B23A60F.57B920E9@link-m.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

Browse pgsql-admin by date

  From Date Subject
Next Message Bruce Momjian 2001-06-11 04:26:52 Re: Intentionally splitting data in a table across files.
Previous Message Bruce Momjian 2001-06-09 22:05:52 Re: pg_dumpall which also dumps lo