From: | Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Ildus Kurbangaliev <i(dot)kurbangaliev(at)postgrespro(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PROPOSAL] Shared Ispell dictionaries |
Date: | 2018-03-25 21:03:28 |
Message-ID: | 20180325210327.GB19457@arthur.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Mar 25, 2018 at 02:28:29PM -0400, Tom Lane wrote:
> Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru> writes:
> > If all dictionaries will be shareable then this view could be removed.
> > Unfortunately I think it can't help with leaked segments, I didn't find
> > a way to iterate dshash entries. That's why pg_ts_shared_dictionaries()
> > scans pg_ts_dict table instead of scanning dshash table.
>
> If you're scanning pg_ts_dict, what happens with dictionaries belonging
> to other databases? They won't be visible in your local copy of
> pg_ts_dict. Between that and the inability to find leaked segments,
> I'm not seeing that this has much use-case.
Indeed pg_ts_dict scanning is wrong way here. And
pg_ts_shared_dictionaries() is definitely broken.
> > Yes unfortunately ALTER TEXT SEARCH DICTIONARY doesn't reload a
> > dictionary. TID can help here. I thought about using XID too when I
> > started to work on RELOAD command. But I'm not sure that it is a good
> > idea, anyway XID isn't needed in current version.
>
> Actually, existing practice is to check both xmin and tid; see for example
> where plpgsql checks if a cached function data structure still matches the
> pg_proc row, pl_comp.c around line 175 in HEAD. The other PLs do it
> similarly I think. I'm not sure offhand just how much that changes the
> risks of a false match compared to testing only one of these fields, but
> I'd recommend conforming to the way it's done elsewhere.
Thank you for pointing to it! I think it shouldn't be hard to use both
xmin and tid.
--
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company
From | Date | Subject | |
---|---|---|---|
Next Message | Vladimir Sitnikov | 2018-03-25 21:16:08 | Re: Backend memory dump analysis |
Previous Message | Arthur Zakirov | 2018-03-25 20:54:10 | Re: [PROPOSAL] Shared Ispell dictionaries |