pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ted Toth <txtoth@gmail.com>
Cc: Brian Crowell <brian@fluggo.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: large numbers of inserts out of memory strategy
Date: Wed, 29 Nov 2017 09:55:06 -0500
Message-ID: <29817.1511967306@sss.pgh.pa.us> (raw)
In-Reply-To: <CAFPpqQH3BRYg9A5PGGTHh0SQrZEmFegOdPrPSrnJxg19nBB+QA@mail.gmail.com>
References: <CAFPpqQGux3uT=CNN-z=zXr4qSmfBw9tDCURimELqEWUBrBpL7A@mail.gmail.com>
	<ad918f32-4913-3dee-281a-5a3fee576a14@2ndquadrant.com>
	<CAFPpqQHY39wDEQm7JeBD6JSN_UgNi-19kdGdZKmhQ2gxTpw8Qw@mail.gmail.com>
	<87d5d3c9-66e4-c29d-bece-79f2909cccb9@2ndquadrant.com>
	<CAFPpqQGJ9GkntRrjEqvHCRtkbHojmTy93LmCpfuMGJj5F2O7-A@mail.gmail.com>
	<8431416a-2ab2-d580-19bd-2c7e3353960d@2ndquadrant.com>
	<CAAQkdDoq2fXk+E1gtVh_rUuJ99iLGrbc7jWBNkZpGHjytf-3NA@mail.gmail.com>
	<26623.1511927991@sss.pgh.pa.us>
	<CAFPpqQH3BRYg9A5PGGTHh0SQrZEmFegOdPrPSrnJxg19nBB+QA@mail.gmail.com>

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




view thread (27+ messages)  latest in thread

Message-ID: <29817.1511967306@sss.pgh.pa.us>
Permalink:  ../29817.1511967306@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/29817.1511967306@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, txtoth@gmail.com, brian@fluggo.com, tomas.vondra@2ndquadrant.com
  Subject: Re: large numbers of inserts out of memory strategy
  In-Reply-To: <29817.1511967306@sss.pgh.pa.us>
  References: <CAFPpqQGux3uT=CNN-z=zXr4qSmfBw9tDCURimELqEWUBrBpL7A@mail.gmail.com> <ad918f32-4913-3dee-281a-5a3fee576a14@2ndquadrant.com> <CAFPpqQHY39wDEQm7JeBD6JSN_UgNi-19kdGdZKmhQ2gxTpw8Qw@mail.gmail.com> <87d5d3c9-66e4-c29d-bece-79f2909cccb9@2ndquadrant.com> <CAFPpqQGJ9GkntRrjEqvHCRtkbHojmTy93LmCpfuMGJj5F2O7-A@mail.gmail.com> <8431416a-2ab2-d580-19bd-2c7e3353960d@2ndquadrant.com> <CAAQkdDoq2fXk+E1gtVh_rUuJ99iLGrbc7jWBNkZpGHjytf-3NA@mail.gmail.com> <26623.1511927991@sss.pgh.pa.us> <CAFPpqQH3BRYg9A5PGGTHh0SQrZEmFegOdPrPSrnJxg19nBB+QA@mail.gmail.com> <29817.1511967306@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox