On Wed, Mar 09, 2011 at 03:58:20PM +0200, Sandy Test wrote:
>
> We want to be able to run a nightly backup using the pg_dump command.
>
> Unfortunately, even with the pg_hba.conf fix of adding host postgres ...
> trust,
>
> It still asks for a password.
pg_hba sometimes surprises people because of its matching rules. If
there's another entry that matches before the explicit postgres entry,
that's the rule you're going to get:
The first record with a matching connection type, client address,
requested database, and user name is used to perform
authentication. There is no "fall-through" or "backup": if one
record is chosen and the authentication fails, subsequent records
are not considered. If no record matches, access is denied.
(http://www.postgresql.org/docs/9.0/interactive/auth-pg-hba-conf.html).
Are you sure that's not your problem. (It always is for me, and I
always make this mistake at least once per installation, even after
many years.)
A
--
Andrew Sullivan
ajs@crankycanuck.ca