From: | Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | Nicolas Barbier <nicolas(dot)barbier(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: WIP: preloading of ispell dictionary |
Date: | 2010-03-24 05:14:55 |
Message-ID: | 4BA99FCF.1080801@postnewspapers.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Pavel Stehule wrote:
> Personally I dislike idea some dictionary precompiler - it is next
> application for maintaining and maybe not necessary.
That's the sort of thing that can be done when first required by any
backend and the results saved in a file for other backends to mmap().
It'd probably want to be opened r/w access-exclusive initially, then
re-opened read-only access-shared when ready for use.
My only concern would be that the cache would want to be forcibly
cleared at postmaster start, so that "restart the postmaster" fixes any
messsed-up-cache issues that might arise (not that they should) without
people having to go rm'ing in the datadir. Even if Pg never has any bugs
that result in bad cache files, the file system / bad memory / cosmic
rays / etc can still mangle a cache file.
BTW, mmap() isn't an issue on Windows:
http://msdn.microsoft.com/en-us/library/aa366556%28VS.85%29.aspx
It's spelled CreateFileMapping, but otherwise is fairly similar, and is
perfect for this sort of use.
A shared read-only mapping of processed-and-cached tsearch2 dictionaries
would save a HUGE amount of memory if many backends were using tsearch2
at the same time. I'd make a big difference here.
--
Craig Ringer
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2010-03-24 05:25:53 | Re: [COMMITTERS] pgsql: Add connection messages for streaming replication. |
Previous Message | Tom Lane | 2010-03-24 02:17:31 | Re: Proposal: access control jails (and introduction as aspiring GSoC student) |