Skip site navigation (1) Skip section navigation (2)

From: Warren Little <warren(dot)little(at)meridiascapital(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject:
Date: 2005-11-01 20:05:15
Message-ID: 1130875516.22825.18.camel@wlittle.meridias.local (view raw or flat)
Thread:
Lists: pgsql-admin
Hello,
I'm trying to make a copy of a database using the following syntax:
pg_dump -v -Fc -b cert | pg_restore -v -d prodcopy

The output looks good until it the following:
pg_dump: socket not open
pg_dump: SQL command to dump the contents of table "casedocument"
failed: PQendcopy() failed.
pg_dump: Error message from server: socket not open
pg_dump: The command was: COPY public.casedocument (pid, content,
createdt, descr, docformat, version, casepid, createuserpid, typepid,
sent, active) TO stdout;
pg_dump: *** aborted because of error
pg_restore: [custom archiver] could not read data block -- expected 1,
got 0
pg_restore: *** aborted because of error

casedocument schema looks like:

CREATE TABLE casedocument
(
  pid varchar(12) NOT NULL,
  content bytea NOT NULL,
  createdt timestamp NOT NULL,
  descr varchar(40),
  docformat varchar(10) NOT NULL,
  version int4 NOT NULL,
  casepid varchar(12) NOT NULL,
  createuserpid varchar(12) NOT NULL,
  typepid varchar(12) NOT NULL,
  sent bool DEFAULT false,
  active bool DEFAULT true,
  CONSTRAINT casedocument_pkey PRIMARY KEY (pid),
  CONSTRAINT casedocument_r0 FOREIGN KEY (pid) REFERENCES pobject (pid)
ON UPDATE NO ACTION ON DELETE NO ACTION,
  CONSTRAINT casedocument_r1 FOREIGN KEY (casepid) REFERENCES cas (pid)
ON UPDATE NO ACTION ON DELETE NO ACTION,
  CONSTRAINT casedocument_r2 FOREIGN KEY (createuserpid) REFERENCES
party (pid) ON UPDATE NO ACTION ON DELETE NO ACTION,
  CONSTRAINT casedocument_r3 FOREIGN KEY (typepid) REFERENCES
casedocumenttype (pid) ON UPDATE NO ACTION ON DELETE NO ACTION
) 
WITH OIDS;
ALTER TABLE casedocument OWNER TO tigris;

Is there any way to determine what data the copy doesn't like

thanks




-- 
Warren Little
Chief Technology Officer
Meridias Capital Inc
Tel: 866.369.7763

pgsql-admin by date

Next:From: Tom LaneDate: 2005-11-01 21:21:33
Subject: Re: Can't dump and restore
Previous:From: Peter DarleyDate: 2005-11-01 18:52:20
Subject: Can't dump and restore

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group