Another issue with pg_hba.conf file & dumpall

From: April Carvalho <acarvalh(at)brave(dot)cs(dot)uml(dot)edu>
To: pgsql-novice(at)postgresql(dot)org
Cc: Dan MacNeil <omacneil(at)brave(dot)cs(dot)uml(dot)edu>
Subject: Another issue with pg_hba.conf file & dumpall
Date: 2004-01-26 22:26:04
Message-ID: Pine.LNX.4.44.0401261657150.26251-100000@brave.cs.uml.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Can't thank you all enough for the help. :-)

Here's another problem I'm having. I'm using pg_dumpall
in a micro sized perl script to dump the entire db cluster.
(All it did was save the password to an environment variable,
and modified the backup file's name to include the date.)

This script has been working on our old server for over a
year. We're trying to get it to work with our new one, but
with stricter security measures. (Our older one used ident,
which our boss has now banned for the new one.) Unfortunately,
I'm getting the following message back when trying to run it
manually:

pg_dump: [archiver (db)] connection to database "db1" failed: FATAL:
No pg_hba.conf entry for host localhost, user postgres, database db1

and dies on the first database:

pg_dumpall: pg_dump failed on db1, exiting

The script is owned by postgres, pg_dumpall is owned by postgres,
and is being run as user postgres with postgres' environment
variables (i.e., su - postgres before execution.). So if it is
a permissions issue with a file, it isn't obvious.

Here's part of my pg_hba.conf file:

local template1 postgres md5
local template1 all reject
host all postgres 127.0.0.1 255.0.0.0 md5
hostssl template1 all 0.0.0.0 0.0.0.0 reject

line #3 should be the one that pg_dumpall should be using.

What am I doing wrong? The docs give examples, but not enough
to get a handle on this problem.

Again, any help would be greatly appreciated.

April Carvalho

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Marcin Gil 2004-01-27 10:30:49 db security; user identification
Previous Message Oliver Elphick 2004-01-26 21:53:32 Re: Problem with pg_hba.conf file in Postgres 7.3