Re: Bad COMPACT_ALLOC_CHUNK size in tsearch/spell.c? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Bad COMPACT_ALLOC_CHUNK size in tsearch/spell.c?
Date
Msg-id 26459.1304352594@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bad COMPACT_ALLOC_CHUNK size in tsearch/spell.c?  (Merlin Moncure <mmoncure@gmail.com>)
Responses Re: Bad COMPACT_ALLOC_CHUNK size in tsearch/spell.c?  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-hackers
Merlin Moncure <mmoncure@gmail.com> writes:
> On Tue, Apr 26, 2011 at 3:19 PM, Merlin Moncure <mmoncure@gmail.com> wrote:
>> On Tue, Apr 26, 2011 at 1:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> After chewing on that thought for a bit, it seems like an easy fix is to
>>> modify AllocSetContextCreate (around line 390 in HEAD's aset.c) so that
>>> allocChunkLimit is not just constrained to be less than maxBlockSize,
>>> but significantly less than maxBlockSize --- say an eighth or so.

>> well, +1 on any solution that doesn't push having to make assumptions
>> about the allocator from the outside. �your fix seems to nail it
>> without having to tinker around with the api which is nice. (plus you
>> could just remove the comment).
>> 
>> Some perfunctory probing didn't turn up any other cases like this.

> patch attached -- I did no testing beyond make check though.  I
> suppose changes to the allocator are not to be take lightly and this
> should really be tested in some allocation heavy scenarios.

I did a bit of testing of this and committed it with minor adjustments.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Proposed patch: Smooth replication during VACUUM FULL
Next
From: Simon Riggs
Date:
Subject: Re: Proposed patch: Smooth replication during VACUUM FULL