Re: [GENERAL] tsearch2 on-demand dictionary loading & using functions in tsearch2

2008-05-23 Thread Ivan Zolotukhin
Hello, We definitely came across this issue recently. When new postgres backend is started it uses ~3MB of the memory accordingly to pmap. When one runs within this backend several typical queries that our application generates its consumed memory increases to 5-8MB which is not critical for us. B

Re: [GENERAL] tsearch2 on-demand dictionary loading & using functions in tsearch2

2008-05-22 Thread iSteve
Craig Ringer wrote: 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 an

Re: [GENERAL] tsearch2 on-demand dictionary loading & using functions in tsearch2

2008-05-18 Thread Craig Ringer
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

Re: [GENERAL] tsearch2 on-demand dictionary loading & using functions in tsearch2

2008-05-18 Thread Tom Lane
Teodor Sigaev <[EMAIL PROTECTED]> writes: >> Hmm, good point; I presume "accept the fact that settings change won't >> propagate to other backends until reconnect" would not be acceptable >> behavior, even if documented along with the relevant configuration option? > I suppose so. That was one o

Re: [GENERAL] tsearch2 on-demand dictionary loading & using functions in tsearch2

2008-05-18 Thread iSteve
Teodor Sigaev wrote: As for downsides, I only really see two: * Tracking updates of dictionaries - but it's reasonable to believe that new connections get open more often than the dictionary gets updated. Also, this might be easily solved by stat()-ing the dictionary file before starting up s

Re: [GENERAL] tsearch2 on-demand dictionary loading & using functions in tsearch2

2008-05-18 Thread Teodor Sigaev
Hmm, good point; I presume "accept the fact that settings change won't propagate to other backends until reconnect" would not be acceptable behavior, even if documented along with the relevant configuration option? I suppose so. That was one of the reasons to move tsearch into core and it wi

Re: [GENERAL] tsearch2 on-demand dictionary loading & using functions in tsearch2

2008-05-18 Thread Teodor Sigaev
* Considering the database is loaded separately for each session, does this also imply that each running backend has a separate dictionary stored in memory? Yes. As for downsides, I only really see two: * Tracking updates of dictionaries - but it's reasonable to believe that new connection

[GENERAL] tsearch2 on-demand dictionary loading & using functions in tsearch2

2008-05-17 Thread iSteve
Hello, I'd like to ask about two separate things regarding tsearch2 in PostgreSQL 8.3. Firstly, I've noticed that dictionary is loaded on-demand specifically for each session, and apparently this behavior cannot be changed in any way. If that's the case, would it be reasonable to ask for an