Re: [PROPOSAL] Shared Ispell dictionaries - Mailing list pgsql-hackers

From Arthur Zakirov
Subject Re: [PROPOSAL] Shared Ispell dictionaries
Date
Msg-id cad38cdb-2bb1-da75-235f-2e6684826f10@postgrespro.ru
Whole thread Raw
In response to Re: [PROPOSAL] Shared Ispell dictionaries  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: [PROPOSAL] Shared Ispell dictionaries  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
List pgsql-hackers
On 21.01.2019 02:43, Tomas Vondra wrote:
> On 1/20/19 11:21 PM, Andres Freund wrote:
>> On 2019-01-20 23:15:35 +0100, Tomas Vondra wrote:
>>> Thanks. I've reviewed v17 today and I haven't discovered any new issues
>>> so far. If everything goes fine and no one protests, I plan to get it
>>> committed over the next week or so.
>>
>> There doesn't seem to be any docs about what's needed to be able to take
>> advantage of shared dicts, and how to prevent them from permanently
>> taking up a significant share of memory.
>>
> 
> Yeah, those are good points. I agree the comments might be clearer, but
> essentially ispell dictionaries are shared and everything else is not.
> 
> As for the memory consumption / unloading dicts - I agree that's
> something we need to address. There used to be a way to specify memory
> limit and ability to unload dictionaries explicitly, but both features
> have been ditched. The assumption was that UNLOAD would be introduced
> later, but that does not seem to have happened.

I'll try to implement the syntax, you suggested earlier:

ALTER TEXT SEARCH DICTIONARY x UNLOAD/RELOAD

The main point here is that UNLOAD/RELOAD can't release the memory 
immediately, because some other backend may pin a DSM.

The second point we should consider (I think) - how do we know which 
dictionary should be unloaded. There was such function earlier, which 
was removed. But what about adding an information in the "\dFd" psql's 
command output? It could be a column which shows is a dictionary loaded.

-- 
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company


pgsql-hackers by date:

Previous
From: Rushabh Lathia
Date:
Subject: "ALTER TRIGGER .. RENAME TO" broken with the "Remove WITH OIDS" commit.
Next
From: amul sul
Date:
Subject: Re: [HACKERS] advanced partition matching algorithm forpartition-wise join