trouble with pg_dumpall

From: "Tena Sakai" <tsakai(at)gallo(dot)ucsf(dot)edu>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: trouble with pg_dumpall
Date: 2008-02-28 01:12:40
Message-ID: FE44E0D7EAD2ED4BB2165071DB8E328C0378F0D2@egcrc-ex01.egcrc.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Everybody,

I started running 8.3.0 recently on dell hardware
with redhat advanced server 4.

I have a problem with pg_dumpall via crontab.
I had a simple crontab to do the same thing on
8.2.4 and the same thing doesn't work.

Here's my very simple crontab entry:

xx xx * * * sh /usr/local/pgsql/cron_dir/moo.sh

and moo.sh is eqally simple:
#! /bin/bash

. .bashrc

filename=`date +%G%m%d.%w`.gz
/usr/local/pgsql/bin/pg_dumpall > $filename

Here's what I get back as output is:

Password:
pg_dumpall: could not connect to database "template1": fe_sendauth: no password supplied

This is not what happened on 8.2.4. I read 8.3.0 man
page on pg_dumpall. Here's what it told me:

The file .pgpass in a user's home directory or the file referenced
by PGPASSFILE can contain passwords to be used if the connection
requires a password (and no password has been specified otherwise).

I have .pgpass in /usr/local/pgsql and when I type
psql dbname
It lets me in without asking the password. So I don't
understand why I get what I get: fe_sendauth: no password supplied

I ran a different cron job which looks like:

#! /bin/bash

. .bashrc

echo PGUSER: $PGUSER
echo PGDATABASE: $PGDATABASE
echo PGHOST: $PGHOST
echo PGPASSFILE: $PGPASSFILE
echo PGDATA: $PGDATA

and everything it told me checks out with what I get from
interactive session.

Please tell me what I am doing wrong. I am at the
end of my wits.

Regards,

Tena Sakai
tsakai(at)gallo(dot)ucsf(dot)edu

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Phillip Smith 2008-02-28 01:19:18 Re: trouble with pg_dumpall
Previous Message salman 2008-02-27 21:05:47 Re: Failover of the Primary database and starting the standby database in Postgresql in PITR configuraiton?