>>>>> "Peter" == Peter Geoghegan <pg@heroku.com> writes:
>> Was there some reason why you added #include "utils/memutils.h"?>> Because I don't see anything in your patch that
actuallyneeds it.
Peter> MaxAllocSize is defiined there.
So it is. (That seems to me to be another mistake along the same lines
as putting the context callbacks in memutils; it's a definition that
callers of palloc need to use, even if they're not creating contexts
themselves.)
However, given that this is a buffer for aligning VARATT_IS_SHORT
datums, allowing it to expand to MaxAllocSize seems like overkill; the
updated patch I just posted preallocates it at the max size of a short
varlena (plus long varlena header).
--
Andrew (irc:RhodiumToad)