Re: [PROPOSAL] Shared Ispell dictionaries

Поиск
Список
Период
Сортировка
Искать
От
Tomas Vondra
Тема
Re: [PROPOSAL] Shared Ispell dictionaries
Дата
Msg-id
5b6ab077-8566-4e04-9d1d-00ab811f0338@2ndquadrant.com
Ответ на
Список
Дерево обсуждения
[PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [PROPOSAL] Shared Ispell dictionaries Pavel Stehule <pavel.stehule@gmail.com>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Ildus Kurbangaliev <i.kurbangaliev@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Andres Freund <andres@anarazel.de>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Pavel Stehule <pavel.stehule@gmail.com>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Pavel Stehule <pavel.stehule@gmail.com>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Pavel Stehule <pavel.stehule@gmail.com>
Re: [PROPOSAL] Shared Ispell dictionaries Pavel Stehule <pavel.stehule@gmail.com>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: [PROPOSAL] Shared Ispell dictionaries Andres Freund <andres@anarazel.de>
Re: [PROPOSAL] Shared Ispell dictionaries Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: [PROPOSAL] Shared Ispell dictionaries Andres Freund <andres@anarazel.de>
Re: [PROPOSAL] Shared Ispell dictionaries Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Ildus Kurbangaliev <i.kurbangaliev@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Tom Lane <tgl@sss.pgh.pa.us>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Tom Lane <tgl@sss.pgh.pa.us>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: [PROPOSAL] Shared Ispell dictionaries Tom Lane <tgl@sss.pgh.pa.us>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Tom Lane <tgl@sss.pgh.pa.us>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Robert Haas <robertmhaas@gmail.com>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: [PROPOSAL] Shared Ispell dictionaries Andres Freund <andres@anarazel.de>
Re: [PROPOSAL] Shared Ispell dictionaries Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Robert Haas <robertmhaas@gmail.com>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Robert Haas <robertmhaas@gmail.com>
Re: [PROPOSAL] Shared Ispell dictionaries Tom Lane <tgl@sss.pgh.pa.us>
Re: [PROPOSAL] Shared Ispell dictionaries Andres Freund <andres@anarazel.de>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Robert Haas <robertmhaas@gmail.com>
Re: [PROPOSAL] Shared Ispell dictionaries Andres Freund <andres@anarazel.de>
Re: [PROPOSAL] Shared Ispell dictionaries Robert Haas <robertmhaas@gmail.com>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Robert Haas <robertmhaas@gmail.com>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Tom Lane <tgl@sss.pgh.pa.us>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Robert Haas <robertmhaas@gmail.com>
Re: [PROPOSAL] Shared Ispell dictionaries Tom Lane <tgl@sss.pgh.pa.us>
Re: [PROPOSAL] Shared Ispell dictionaries Robert Haas <robertmhaas@gmail.com>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Tom Lane <tgl@sss.pgh.pa.us>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: [PROPOSAL] Shared Ispell dictionaries Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [PROPOSAL] Shared Ispell dictionaries Tomas Vondra <tomas.vondra@2ndquadrant.com>


On 03/31/2018 12:42 PM, Arthur Zakirov wrote:
> Hello all,
> 
> I'd like to add new optional function to text search template named fini
> in addition to init() and lexize(). It will be called by
> RemoveTSDictionaryById() and AlterTSDictionary(). dispell_fini() will
> call ts_dict_shmem_release().
> 
> It doesn't change segments leaking situation. I think it makes text
> search API more transparent.
> 

If it doesn't actually solve the problem, why add it? I don't see a
point in adding functions for the sake of transparency, when it does not
in fact serve any use cases.

Can't we handle the segment-leaking by adding some sort of tombstone?

For example, imagine that instead of removing the hash table entry we
mark it as 'dropped'. And after that, after the lookup we would know the
dictionary was removed, and the backends would load the dictionary into
their private memory.

Of course, this could mean we end up having many tombstones in the hash
table. But those tombstones would be tiny, making it less painful than
potentially leaking much more memory for the dictionaries.

Also, I wonder if we might actually remove the dictionaries after a
while, e.g. based on XID. Imagine that we note the XID of the
transaction removing the dictionary, or perhaps XID of the most recent
running transaction. Then we could use this to decide if all running
transactions actually see the DROP, and we could remove the tombstone.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

В списке pgsql-hackers по дате отправления
От: Alvaro Herrera
Дата:
От: Craig Ringer
Дата:
FAQ