Re: Restoring large tables with COPY - Mailing list pgsql-hackers

From Marko Kreen
Subject Re: Restoring large tables with COPY
Date
Msg-id 20011211172551.GA5065@l-t.ee
Whole thread Raw
In response to Re: Restoring large tables with COPY  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Restoring large tables with COPY  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Dec 11, 2001 at 10:55:30AM -0500, Tom Lane wrote:
> Marko Kreen <marko@l-t.ee> writes:
> > Maybe I am missing something obvious, but I am unable to load
> > larger tables (~300k rows) with COPY command that pg_dump by
> > default produces.
>
> I'd like to find out what the problem is, rather than work around it
> with such an ugly hack.

Hmm, the problem was more 'interesting' than I thought.
Basically:

1) pg_dump of 7.1.3 dumps constraints and primary keys
   with table defs in this case, so they are run during COPY.
2) I have some tricky CHECK contraints.

Look at the attached Python script, it reproduces the problem.
Sorry, cannot test on 7.2 at the moment.

--
marko


Attachment

pgsql-hackers by date:

Previous
From: "Serguei Mokhov"
Date:
Subject: Re: Restoring large tables with COPY
Next
From: Marko Kreen
Date:
Subject: Re: Restoring large tables with COPY