Re: Out of Memory - 8.2.4 - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Out of Memory - 8.2.4
Date
Msg-id 20070924035724.GE5679@alvh.no-ip.org
Whole thread Raw
In response to Re: Out of Memory - 8.2.4  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Tom Lane escribió:
> Alvaro Herrera <alvherre@commandprompt.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

pgsql-general by date:

Previous
From: Ow Mun Heng
Date:
Subject: Re: help w/ SRF function
Next
From: Alvaro Herrera
Date:
Subject: Re: SRF called with optional NULL input runs 7x slower