From: | Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: tsearch2 on-demand dictionary loading & using functions in tsearch2 |
Date: | 2008-05-18 17:15:25 |
Message-ID: | 4830642D.3030804@postnewspapers.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tom Lane wrote:
> What I think *is* worth doing is spending some time on making dictionary
> loading go faster.
This is probably a stupid question, but: with PostgreSQL's use of shared
memory, is it possible to load dictionaries into a small reserved shm
area when the first backend starts, then use the preloaded copy in
subsequent backends?
That way the postmaster doesn't have to do any risky work.
Anything that reduces backend startup costs and per-backend unshared
memory would have to be a good thing.
I've found it useful in the past to share resources with an mmap()ped
file, too, especially if I want write protection from some or all
processes. If the postmaster forked a process to generate the mmap()able
compiled dictionary files on startup then it'd be pretty safe from any
misbehaviour of the dictionary compiling process.
Then again, I can't say I've personally noticed the cost of loading
tsearch2 dictionaries.
--
Craig Ringer
From | Date | Subject | |
---|---|---|---|
Next Message | Reece Hart | 2008-05-18 23:02:44 | Re: Link tables from different databases |
Previous Message | Tom Lane | 2008-05-18 16:56:14 | Re: tsearch2 on-demand dictionary loading & using functions in tsearch2 |