Re: [PROPOSAL] Shared Ispell dictionaries

From: Andres Freund <andres(at)anarazel(dot)de>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PROPOSAL] Shared Ispell dictionaries
Date: 2019-02-03 10:58:11
Message-ID: 20190203105811.hvftbjdlvonpmgqx@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2019-02-01 09:40:44 -0500, Robert Haas wrote:
> On Tue, Jan 22, 2019 at 2:17 PM Tomas Vondra
> <tomas(dot)vondra(at)2ndquadrant(dot)com> wrote:
> > I think there are essentially two ways:
> >
> > (a) Define max amount of memory available for shared dictionarires, and
> > come up with an eviction algorithm. This will be tricky, because when
> > the frequently-used dictionaries need a bit more memory than the limit,
> > this will result in trashing (evict+load over and over).
> >
> > (b) Define what "unused" means for dictionaries, and unload dictionaries
> > that become unused. For example, we could track timestamp of the last
> > time each dict was used, and decide that dictionaries unused for 5 or
> > more minutes are unused. And evict those.
> >
> > The advantage of (b) is that it adopts automatically, more or less. When
> > you have a bunch of frequently used dictionaries, the amount of shared
> > memory increases. If you stop using them, it decreases after a while.
> > And rarely used dicts won't force eviction of the frequently used ones.
>
> +1 for (b).

This patch has been waiting on author for two weeks, the commitfest has
ended, and there's substantial work needed. Therefore I'm marking the
patch as returned with feedback. Please resubmit a new version, once the
feedback has been addressed.

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2019-02-03 11:00:11 Re: pg_upgrade: Pass -j down to vacuumdb
Previous Message andres@anarazel.de 2019-02-03 10:52:41 Re: allow online change primary_conninfo