Re: [HACKERS] memory problems in copying large table to STDOUT - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] memory problems in copying large table to STDOUT
Date
Msg-id 11327.939484474@sss.pgh.pa.us
Whole thread Raw
In response to memory problems in copying large table to STDOUT  (Martin Weinberg <weinberg@osprey.astro.umass.edu>)
Responses Re: [HACKERS] memory problems in copying large table to STDOUT  (Martin Weinberg <weinberg@osprey.astro.umass.edu>)
List pgsql-hackers
Martin Weinberg <weinberg@osprey.astro.umass.edu> writes:
> I've been struggling to copy a large table (200 million
> records, 60GB) to tape using:
>    psql -qc "copy psc to STDOUT;" Winter99 | dd of=/dev/st0 bs=32k
> After processing about 10 million records (this varies), I
> get:
>   FATAL 1:  Memory exhausted in AllocSetAlloc()

Hmm.  What is the exact declaration of the table?

The only explanation I can think of offhand is that the output
conversion function for one of the column types is leaking memory...
copy.c itself looks to be pretty careful not to.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Re: [GENERAL] Update of bitmask type
Next
From: Martin Weinberg
Date:
Subject: Re: [HACKERS] memory problems in copying large table to STDOUT