Re: patch: preload dictionary new version

Itagaki Takahiro <itagaki.takahiro@gmail.com>

From: Itagaki Takahiro <itagaki.takahiro@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Pavel Stehule <pavel.stehule@gmail.com>, Robert Haas <robertmhaas@gmail.com>, Takahiro Itagaki <itagaki.takahiro@oss.ntt.co.jp>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2010-07-12T00:47:57Z
Lists: pgsql-hackers
2010/7/8 Tom Lane <tgl@sss.pgh.pa.us>:
> For example, the dictionary-load code could automatically execute
> the precompile step if it observed that the precompiled copy of the
> dictionary was missing or had an older file timestamp than the source.

There might be a problem in automatic precompiler -- Where should we
save the result? OS users of postgres servers don't have write-permission
to $PGSHARE in normal cases. Instead, we can store the precompiled
result to $PGDATA/pg_dict_cache or so.

> I like the idea of a precompiler step mainly because it still gives you
> most of the benefits of the patch on platforms without mmap.

I also like the precompiler solution. I think the most important benefit
in the approach is that we don't need to declare dictionaries to be preloaded
in configuration files; We can always use mmap() for all dictionary files.

-- 
Takahiro Itagaki