Re: patch: tsearch - some memory diet

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, PostgreSQLHackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: patch: tsearch - some memory diet
Date: 2010-10-04 06:05:48
Message-ID: AANLkTik7YUnqM-7KHOYyRSw+Q4sFvKLvNjaTjfVFnFz5@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

2010/10/4 Robert Haas <robertmhaas(at)gmail(dot)com>:
> On Oct 3, 2010, at 7:02 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> It's not at all apparent that the code is even
>> safe as-is, because it's depending on the unstated assumption that that
>> static variable will get reset once per dictionary.  The documentation
>> is horrible: it doesn't really explain what the patch is doing, and what
>> it does say is wrong.
>
> Yep. We certainly would need to convince ourselves that this is correct before applying it, and that is all kinds of non-obvious.
>

what is good documentation?

This patch doesn't do more, than it removes palloc overhead on just
one structure of TSearch2 ispell dictionary. It isn't related to some
static variable - the most important is fact so this memory is
unallocated by dropping of memory context.

Regards

Pavel Stehule

> ...Robert

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hitoshi Harada 2010-10-04 06:36:48 Re: wip: functions median and percentile
Previous Message Itagaki Takahiro 2010-10-04 03:45:02 Re: I: About "Our CLUSTER implementation is pessimal" patch