Thread: pg_dump failed

pg_dump failed

From
Milan Krajnak
Date:
hello,

i've got the following problem:
OS - Solaris 8/9 on Sun SPARC
PGSQL 7.1.3

when i try to dump the database with pg_dump command i've got the
following error:

--  last builtin oid is 18539
--  reading user-defined types
--  reading user-defined functions
--  reading user-defined aggregates
--  reading user-defined operators
--  reading user-defined tables
getTables(): SELECT failed.  Explanation from backend: 'pqReadData() --
backend
closed the channel unexpectedly.
         This probably means the backend terminated abnormally
         before or while processing the request.
'.

the same error appears when a try to display the database schema using
\d in psql shell e.g.

$ psql -U user db
psql# \d
getTables(): SELECT failed.  Explanation from backend: 'pqReadData() --
backend
closed the channel unexpectedly.
         This probably means the backend terminated abnormally
         before or while processing the request.
'.

but when a type:
psql# \d table_name
everything works fine ...

what's wrong ?
pg_dump is really really really important for me ... thanx in advance ...

--
Milan Krajnak
senior software architect
e-mail: milan_krajnak@abilitydev.com
phone: +421 2 50267546
fax  : +421 2 50267500
Ability Development SK
http://www.abilitydev.com

Attachment

Re: pg_dump failed

From
Tom Lane
Date:
Milan Krajnak <milan_krajnak@abilitydev.com> writes:
> psql# \d
> getTables(): SELECT failed.  Explanation from backend: 'pqReadData() --
> backend
> closed the channel unexpectedly.

Standard questions: what shows up in the postmaster's log (stderr or
syslog depending on your setup) when this happens?  Is there a core
file dropped in the database subdirectory ($PGDATA/base/something/)?
If so, please get a debugger backtrace from it.

I get the impression that there may be corrupt data in your pg_class
file --- can you do "select * from pg_class" without a crash?
How about pg_user and pg_rewrite?

            regards, tom lane