On Thu, May 17, 2018 at 02:14:07PM -0400, Robert Haas wrote:
> On Thu, May 17, 2018 at 1:52 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > Do we actually need to worry about unmapping promptly on DROP TEXT
> > DICTIONARY? It seems like the only downside of not doing that is that
> > we'd leak some address space until process exit. If you were thrashing
> > dictionaries at some unreasonable rate on a 32-bit host, you might
> > eventually run some sessions out of address space; but that doesn't seem
> > like a situation that's so common that we need fragile coding to avoid it.
>
> I'm not sure what the situation is here.
I think this case may take place when you continuously create, drop a
lot of dictionaries; different connections concurrently work with them
and some of connection stops working with text search at some point and
therefore pinned segments won't be unpinned.
But I'm not sure is this real case. Text search configuration changes
should be very infrequent (as it is written on in the
InvalidateTSCacheCallBack commentary).
--
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company