Re: Abbreviated keys for Numeric - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: Abbreviated keys for Numeric
Date
Msg-id 87bnjkbi1e.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: Abbreviated keys for Numeric  (Peter Geoghegan <pg@heroku.com>)
List pgsql-hackers
>>>>> "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)



pgsql-hackers by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: Abbreviated keys for Numeric
Next
From: Andrew Gierth
Date:
Subject: Re: debug_sortsupport GUC?