Re: Out of Memory Error on Insert

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Priest <mark(dot)priest(at)computer(dot)org>
Cc: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>, pgsql-general(at)postgresql(dot)org
Subject: Re: Out of Memory Error on Insert
Date: 2011-10-19 03:11:57
Message-ID: 2295.1318993917@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mark Priest <mark(dot)priest(at)computer(dot)org> writes:
> However, I am still curious as to why I am getting an out of memory
> error. I can see how the performance might be terrible on such a
> query but I am surprised that postgres doesn't start using the disk at
> some point to reduce memory usage. Could it be that postgres tries
> to keep temp tables in memory?

You're running out of memory in the planner, long before execution ever
happens. (This is apparent from the memory map, but I also verified it
with a debugger yesterday.) There really isn't any alternative but to
change the form of the query or upgrade to a newer PG.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2011-10-19 05:28:01 Re: Need Help : PostgreSQL Installation on Windows 7 64 bit
Previous Message Mark Priest 2011-10-19 02:41:20 Re: Out of Memory Error on Insert