Re: [HACKERS] dumpall prob

From: "Patrick Welche" <prlw1(at)newn(dot)cam(dot)ac(dot)uk>
To: lockhart(at)alumni(dot)caltech(dot)edu (Thomas Lockhart)
Cc: hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] dumpall prob
Date: 1999-12-15 18:20:12
Message-ID: E11yJ25-00022w-00@quartz.newn.cam.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> % pg_dumpall > db.out2
> Connection to database 'List' failed.
> pqReadData() -- backend closed the channel unexpectedly.
> This probably means the backend terminated abnormally
> before or while processing the request.
>
> pg_dump failed on List, exiting
>
>
> ... investigating ...

Reason:

In pg_dumpall, line 50 is:

psql -l -A -q -t| tr '|' ' ' | grep -v '^template1 ' | \

which outputs:

% psql -l -A -q -t| tr '|' ' ' | grep -v '^template1 '
List of databases
Database Owner
darwin prlw1
...
(5 rows)

so presumably, it tries to open a connection to "List" as user "of"
this implies that "-q" isn't quite as quiet as it could be...

I tried changing it to

psql -l -A -q -t| tr '|' ' ' | egrep -v '(^template1 |^List of databases|^Database Owner| rows)' | \

as a work around, but then:

\connect template1 ERROR: attribute 'prlw1' not found
create database darwin;
\connect darwin ERROR: attribute 'prlw1' not found

etc

and this is because line 56 wants to read

where usesysid = \'$DBUSERID\'; \" | \
rather than
where usesysid = $DBUSERID; \" | \

Cheers,

Patrick

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Don Baccus 1999-12-15 19:12:54 Re: [HACKERS] SELECT ... AS ... names in WHERE/GROUP BY/HAVING
Previous Message Patrick Welche 1999-12-15 17:42:20 Re: [HACKERS] initdb / pg_version