Connecting via localhost pg-8.0.3 - Mailing list pgsql-admin

From David
Subject Connecting via localhost pg-8.0.3
Date
Msg-id 20050615022603.GA1615@localhost.localdomain
Whole thread Raw
Responses Re: Connecting via localhost pg-8.0.3  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
I'm not sure to what list this question belongs, but here goes.

I've just upgraded from 7.4.7 to 8.0.3.  All seems to have upgraded well
but I've stumbled across one thing I don't understand.  It now seems
that I have to include host=localhost in the pg_connect params from a
php script, whereas these same scripts without this specification worked
with 7.4.7.

I get the following error if I omit "host=localhost"  :

Warning: pg_connect(): Unable to connect to PostgreSQL server: could
not connect to server: ¸^@Hv@' Is the server running locally and
accepting connections on Unix domain socket
"/var/run/postgresql/.s.PGSQL.5432"? in
/home/dlb/public_html/test.php
on line 2

I notice that it appears from the above that without the host
specification, the server name comes across as garbage.  Again, adding
the host specification eliminates the error.

In my postgresql.conf file, I have the line:

listen_addresses = '*'

the php manual says that you need the '-i' option, but from the 8.0-
docs, it states that the -i option is deprecated and the above line
takes care of it.

This is no show-stopper, just a matter of editing a few lines in my php
files, but I'm just wondering if it's a config parameter on my part or a
change in postgres' default behavior.  My php (4.3.10) hasn't been
upgraded for some time, so it shouldn't be in php.


pgsql-admin by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: max_fsm_pages
Next
From: "Amrit Angsusingh"
Date:
Subject: Blob error after backup and restore [database > 5.5 Gb.]