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

Re: BUG #2428: ERROR: out of memory, running INSERT SELECT

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Casey Duncan <casey(at)pandora(dot)com>,pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2428: ERROR: out of memory, running INSERT SELECT
Date: 2006-05-15 17:49:15
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
On Fri, May 12, 2006 at 08:04:20AM +0100, Simon Riggs wrote:
> On Thu, 2006-05-11 at 20:14 -0400, Tom Lane wrote:
> > Casey Duncan <casey(at)pandora(dot)com> writes:
> > > On May 11, 2006, at 4:42 AM, Simon Riggs wrote:
> > >> As your database is defined, this SQL statement will return
> > >> approximately 4 trillion rows, by my calculation. As you say, it  
> > >> returns no rows at all when the database is empty.
> > 
> > > *slaps forehead* I totally missed the "!=" in the where clause, Doh!  
> > > Thanks for hitting me with a clue-stick.
> > 
> > I'm still wondering why you got "out of memory", though.  I'd have
> > expected that to grind for a really long time, gradually filling your
> > disk, until you got an out-of-disk-space kind of error; if you didn't
> > notice and stop it first.  There aren't (supposed to be) any long-term
> > memory leaks in query processing, other than than the known issue of
> > pending trigger events, which you say you haven't got on this table.
> Seems broken either way, OOM or OOD. We need a way to stop runaway
> queries from happening in the first place.

Well, the question still remains, had they been trying this with a 100TB
table, would it have actually worked, or is there some kind of overflow?
Jim C. Nasby, Sr. Engineering Consultant      jnasby(at)pervasive(dot)com
Pervasive Software    work: 512-231-6117
vcard:       cell: 512-569-9461

In response to

pgsql-bugs by date

Next:From: Jim C. NasbyDate: 2006-05-15 17:54:38
Subject: Re: [BUGS] BUG #2429: Explain does not report object's schema
Previous:From: Tom LaneDate: 2006-05-15 13:50:57
Subject: Re: BUG #2437: Rules for COPY

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