Re: large numbers of inserts out of memory strategy - Mailing list pgsql-general

From Tom Lane
Subject Re: large numbers of inserts out of memory strategy
Date
Msg-id 29817.1511967306@sss.pgh.pa.us
Whole thread Raw
In response to Re: large numbers of inserts out of memory strategy  (Ted Toth <txtoth@gmail.com>)
List pgsql-general
Ted Toth <txtoth@gmail.com> writes:
> On Tue, Nov 28, 2017 at 9:59 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> So whatever's going on here, there's more to it than a giant client-issued
>> INSERT (or COPY), or for that matter a large number of small ones.  What
>> would seem to be required is a many-megabyte-sized plpgsql function body
>> or DO block.

> Yes I did generate 1 large DO block:

Apparently by "large" you mean "hundreds of megabytes".  Don't do that,
at least not on a machine that hasn't got hundreds of megabytes to spare.
The entire thing has to be sucked into menory and parsed before anything
will happen.
        regards, tom lane


pgsql-general by date:

Previous
From: Ted Toth
Date:
Subject: Re: large numbers of inserts out of memory strategy
Next
From: Marti Raudsepp
Date:
Subject: Re: seq vs index scan in join query