Re: Everything is now "required by the database system"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hannu Krosing <hannu(at)tm(dot)ee>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Everything is now "required by the database system"
Date: 2002-08-13 20:32:04
Message-ID: 862.1029270724@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hannu Krosing <hannu(at)tm(dot)ee> writes:
> On Wed, 2002-08-14 at 00:38, Tom Lane wrote:
>> For an embedded system I'd think you'd want to strip out the support
>> code for the unwanted types (ie, the utils/adt/ file(s)), not only the
>> catalog entries.

> But if the types themselves were installable, then it would also mean
> that unneeded utils/adt/ code would not be installed without need.

Only if someone went to the trouble of repackaging each such datatype
as a separate shared library. That's a lot more work than what I
understood Peter to be suggesting (namely, install the catalog entries
a little later during initdb).

>> I'd also be concerned about the performance hit (loadable
>> functions are noticeably slower than built-ins).

> Really ?

Yup.

> How much is the performance hit ?

I'm not sure, but it's nontrivial. I recall Oleg and Teodor moaning
about the poor performance of GiST-index contrib modules awhile back,
at a time when we did fmgr_info for index access functions once per
call instead of caching the results in the index' relcache entry.
It didn't hurt for built-in access functions but you sure noticed it
for loadable ones.

It might be feasible to persuade fmgr.c or dfmgr.c to short-circuit
lookups of dynamic functions after the first time, by keeping an
internal lookup table comparable to the compile-time-constant table
we have for builtins. This would not make the problem go away, but
it would lessen the performance hit...

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-08-13 20:39:15 Re: FUNC_MAX_ARGS benchmarks
Previous Message Dave Page 2002-08-13 20:16:38 Re: libpqxx