Thread: Data Dump Issue

Data Dump Issue

From
Murali Mohan Kasetty
Date:
Hi,

   I'm trying to dump the data from one PostgreqSQL 7.1.3 server to
another PostgreqSQL 7.1.3 server.

   As per the documentation given, I have used the following commands
for the dump

In first server
----------------------------
pg_dump -o dbname  >  outfile

Its created outfile without any errors.

In Second server
------------------------------------
(1) ./createdb dbname
(2) ./psql dbname  <  outfile

When I try to run the command (2)  in Second server, I got the following

error

"pqReadData() -- backend closed the channel unexpectedly.
        This probably means the backend terminated abnormally
        before or while processing the request.
        PQendcopy: resetting connection"

and the error message on Postmaster console is  "Socket command type \
unknown"

Any help would be greatly appreciated.

Thanks in advance,
Murali

Attachment

Re: Data Dump Issue

From
Tom Lane
Date:
Murali Mohan Kasetty <kasetty@india.hp.com> writes:
> When I try to run the command (2)  in Second server, I got the following
> error

> "pqReadData() -- backend closed the channel unexpectedly.
>         This probably means the backend terminated abnormally
>         before or while processing the request.
>         PQendcopy: resetting connection"

> and the error message on Postmaster console is  "Socket command type \
> unknown"

You sure that's the only message?  This looks like the second backend
has rejected some line of COPY data (probably due to a foreign-key or
unique constraint).  The relevant error would be before the complaint
about socket command unknown.

            regards, tom lane