Thread: pg_hba.conf file

pg_hba.conf file

From
"Martin A. Marques"
Date:
I'm currently working on a proyect that has Postgres as the database storage
server, and PHP-4.0.4pl1 as the language to use in comunication with the users.
What I can't get to understand is how PHP comunicates with the database, so that
I can set the correct hba.conf enteries.
PHP will be on the same server as Postgres is, and the pg_hba.conf file contains
this, which I'm not sure is a good configuration:

local   all                                             trust
host    all     127.0.0.1       255.255.255.255         password
host    all     168.96.132.31   255.255.255.0           password
host    all     170.210.8.31    255.255.255.0           password

What do you people hear think of this? I'm consurned about the local enterie,
but when I put password instead of trust, I can't login with PHP to the
database.
Any thoughts?

Saludos... ;-)


System Administration: It's a dirty job,
but someone told I had to do it.
-----------------------------------------------------------------
Martín Marqués                  email:  martin@math.unl.edu.ar
Santa Fe - Argentina            http://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-----------------------------------------------------------------

Error message on pg_dumpall

From
"Dan Harrington"
Date:
Hello,
What does this error mean?  I'm trying to make a backup of all my databases
and then this
error comes up.

Thanks
Dan


============================================================================
======

bash# pg_dumpall -o >/tmp/db.out
NOTICE:  Unrecognized variable client_encoding
NOTICE:  Unrecognized variable client_encoding
NOTICE:  Unrecognized variable client_encoding
NOTICE:  Unrecognized variable client_encoding
/usr/bin/pg_dumpall: createdb: command not found
NOTICE:  Unrecognized variable client_encoding
getInherits(): SELECT failed.  Explanation from backend: 'ERROR:  Attribute
'inhrel' not found
'.
pg_dump failed on goodsalt, exiting


Re: pg_hba.conf file

From
Peter Eisentraut
Date:
Martin A. Marques writes:

> local   all                                             trust
> host    all     127.0.0.1       255.255.255.255         password
> host    all     168.96.132.31   255.255.255.0           password
> host    all     170.210.8.31    255.255.255.0           password
>
> What do you people hear think of this? I'm consurned about the local enterie,
> but when I put password instead of trust, I can't login with PHP to the
> database.

Apparently, your PHP application connects through the 'local' (Unix domain
socket) connection.  That means the 'host' entries are irrelevant.  Of
course if you set the authentication method to 'password' and don't
actually provide a (correct) password then things aren't going to work.

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


Re: Error message on pg_dumpall

From
Peter Eisentraut
Date:
Dan Harrington writes:

> bash# pg_dumpall -o >/tmp/db.out
> NOTICE:  Unrecognized variable client_encoding
> NOTICE:  Unrecognized variable client_encoding
> NOTICE:  Unrecognized variable client_encoding
> NOTICE:  Unrecognized variable client_encoding
> /usr/bin/pg_dumpall: createdb: command not found
> NOTICE:  Unrecognized variable client_encoding
> getInherits(): SELECT failed.  Explanation from backend: 'ERROR:  Attribute
> 'inhrel' not found
> '.
> pg_dump failed on goodsalt, exiting

Looks like you're running an old pg_dump with a newer server (or vice
versa, don't recall).  You need to use pg_dump from the release that your
server came from.

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/