From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Luca Ferrari <fluca1978(at)infinito(dot)it> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: pg_dump cannot connect when executing by a script |
Date: | 2010-05-25 14:51:13 |
Message-ID: | 22856.1274799073@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Luca Ferrari <fluca1978(at)infinito(dot)it> writes:
> for my case: when I executed pg_dump against a database from a script (that
> will be executed by cron) I got the following error:
> pg_dump: [archiver (db)] connection to database "webcalendardb" failed: could
> not connect to server: No such file or directory
> Is the server running locally and accepting
> connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
> and the line the script is executing is the following:
> /usr/local/bin/pg_dump -f
> /backup/sedeldap/postgresql//webcalendardb2010_05_25.sql -h sedeldapa -U
> postgres webcalendardb
Well, um, that command line can't possibly give rise to that error
message. pg_dump is evidently trying to connect via Unix socket,
which it absolutely won't do if given a "-h host" argument.
> Any idea? The only thing I suspect is that I change the IFS in the shell
> script, but I also restore it back before trying to pg_dump.
I suspect that the command is being misparsed, perhaps because your
fooling with IFS is having more effect than you realize. You might want
to try inserting "echo", or some other way of debugging exactly how the
command arguments are getting divided up.
Another theory: the script you're executing is not the one you think it
is. We've seen more than one person waste a lot of time that way :-(
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Sabino Mullane | 2010-05-25 15:18:43 | [OT] Re: update from postgresql 8.3.7 to 8.4.4 |
Previous Message | Gary Fu | 2010-05-25 14:18:19 | No lidbl.so in libpq.so (postgresql 8.4.4) |