Thread: pg_dumpall fails

pg_dumpall fails

From
Ivan
Date:
Hello,

When i do:

pg_dumpall -D --disable-dollar-quoting -U postgres -h hostname > cluster.backup

the following error occurs:

pg_dump.exe: [archiver (db)] connection to database "example" failed: could not translate host name
"'hostname'" to address: Unknown host
pg_dumpall.EXE: pg_dump failed on database "example", exiting

database "example" exist in the cluster
real host name i replaced with string hostname

WinXp SP2
PostgreSQL 8.0beta2

----------------------------------------------
Then I get from cvs latest version
(PostgreSQL 8.0.0beta3 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.2.3 (mingw special 20030504-1))

Perform initdb,
with psql do

create database "example1" with encoding = 'WIN';

and quit.

pg_dumpall -D --disable-dollar-quoting -U postgres -h localhost

fails with:
--
-- PostgreSQL database cluster dump
--

\connect "template1"

--
-- Users
--

--
-- Database creation
--

CREATE DATABASE example1 WITH TEMPLATE = template0 OWNER = postgres ENCODING = 'WIN';

--
-- Users
--

ALTER USER postgres WITH CREATEDB CREATEUSER;

\connect example1

pg_dump.exe: [archiver (db)] connection to database "example1" failed: could not translate host name
 "'localhost'" to address: Unknown host
pg_dumpall.EXE: pg_dump failed on database "example1", exiting

and

pg_dumpall -D --disable-dollar-quoting -U postgres

outputs following:

--
-- PostgreSQL database cluster dump
--

\connect "template1"

--
-- Users
--

--
-- Database creation
--

CREATE DATABASE example1 WITH TEMPLATE = template0 OWNER = postgres ENCODING = 'WIN';

--
-- Users
--

ALTER USER postgres WITH CREATEDB CREATEUSER;


\connect example1

pg_dump.exe: [archiver (db)] connection to database "example1" failed: FATAL:  user "'postgres'" doe
s not exist
pg_dumpall.EXE: pg_dump failed on database "example1", exiting


--
Best regards,
 Ivan                          mailto:Ivan-Sun1@mail.ru