Re: Out of Memory - 8.2.4

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Marko Kreen <markokr(at)gmail(dot)com>, Jeff Amiel <becauseimjeff(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Out of Memory - 8.2.4
Date: 2007-09-24 03:57:24
Message-ID: 20070924035724.GE5679@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane escribió:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > ! /* no need to allocate more space than we have pages */
> > ! maxtuples = LAZY_ALLOC_TUPLES * relblocks;
>
> Uh ... you need to guard against integer overflow in this calculation.

Done this way. I applied it all the way back to 8.0, because 8.2 was
requested and supporting 8.1 in this way still seems necessary; and the
8.1 patch applied cleanly to 8.0 so I did that one too. It didn't apply
cleanly to 7.4 though, but I don't think I've ever seen a complaint
about this with so old a version. It's only a wording change in a
comment though, so it's trivial to apply it back if somebody feels it's
needed.

Sorry it didn't make it into 8.2.5 :-(

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2007-09-24 04:18:12 Re: SRF called with optional NULL input runs 7x slower
Previous Message Ow Mun Heng 2007-09-24 03:48:01 Re: help w/ SRF function