From: | Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> |
---|---|
To: | Peter Geoghegan <pg(at)heroku(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Abbreviated keys for Numeric |
Date: | 2015-03-23 01:52:35 |
Message-ID: | 87bnjkbi1e.fsf@news-spur.riddles.org.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>>>>> "Peter" == Peter Geoghegan <pg(at)heroku(dot)com> writes:
>> Was there some reason why you added #include "utils/memutils.h"?
>> Because I don't see anything in your patch that actually needs 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)
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Gierth | 2015-03-23 01:59:38 | Re: debug_sortsupport GUC? |
Previous Message | Andrew Gierth | 2015-03-23 01:48:22 | Re: Abbreviated keys for Numeric |