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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Casey Duncan <casey(at)pandora(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2428: ERROR: out of memory, running INSERT SELECT statement
Date: 2006-05-12 00:14:54
Message-ID: 18814.1147392894@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Simon Riggs 2006-05-12 07:04:20 Re: BUG #2428: ERROR: out of memory, running INSERT SELECT
Previous Message Tom Lane 2006-05-11 19:47:25 Re: possible bug in SELECT with UNION