pg_restore fails for postgis data dump

Started by Stefan Schwarzerabout 18 years ago2 messagesgeneral
Jump to latest
#1Stefan Schwarzer
stefan.schwarzer@grid.unep.ch

Hi there,

I just wanted to restore a dump which I did, which includes some
postgis data. But, it doesn't work and instead I get this error message:

pg_restore: restoring data for table "boundaries_national"
pg_restore: [archiver (db)] error returned by PQputCopyData: server
closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
pg_restore: *** aborted because of error

The log shows this:
__________________________________________________________________
LOG: server process (PID 737) was terminated by signal 10
LOG: terminating any other active server processes
WARNING: terminating connection because of crash of another server
process
DETAIL: The postmaster has commanded this server process to roll back
the current transaction and exit, because another server process
exited abnormally and possibly corrupted shared memory.
HINT: In a moment you should be able to reconnect to the database and
repeat your command.
LOG: all server processes terminated; reinitializing
LOG: database system was interrupted at 2008-02-01 15:07:12 CET
LOG: checkpoint record is at 0/FC56620C
LOG: redo record is at 0/FC56620C; undo record is at 0/0; shutdown
FALSE
LOG: next transaction ID: 0/8880241; next OID: 9551872
LOG: next MultiXactId: 1; next MultiXactOffset: 0
LOG: database system was not properly shut down; automatic recovery
in progress
LOG: redo starts at 0/FC566254
LOG: record with zero length at 0/FC7435DC
LOG: redo done at 0/FC7435B4
LOG: database system is ready
__________________________________________________________________

What does it mean? The dump is from a 8.1 database, whereas the new
one is 8.2. There is surely as well some difference in postgis
version. Can it be linked to that? I am working with Leopard.

Thanks for any advice.

Stef

____________________________________________________________________

Lean Back and Relax - Enjoy some Nature Photography
http://photoblog.la-famille-schwarzer.de

Appetite for Global Data? UNEP GEO Data Portal:
http://geodata.grid.unep.ch
____________________________________________________________________

Attachments:

smime.p7sapplication/pkcs7-signature; name=smime.p7sDownload
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Stefan Schwarzer (#1)
Re: pg_restore fails for postgis data dump

Stefan Schwarzer <stefan.schwarzer@grid.unep.ch> writes:

I just wanted to restore a dump which I did, which includes some
postgis data. But, it doesn't work and instead I get this error message:
pg_restore: restoring data for table "boundaries_national"
pg_restore: [archiver (db)] error returned by PQputCopyData: server
closed the connection unexpectedly
What does it mean? The dump is from a 8.1 database, whereas the new
one is 8.2.

The postgis mailing lists could probably offer you better advice about
exactly how to update a postgis installation, but my uninformed guess
would be that you have to load 8.2 postgis into the (empty) target
database before you restore. This defeats the dump script's attempts
to install 8.1 postgis objects, which aren't compatible.

regards, tom lane