> % 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