Subject: is postgres without dynamic load ok?

From: erik vangilder <[email-masked]>
Date: Wed, 15 Sep 93 14:36:02 EDT

Since postgres does not support my platform yet and I don't yet
have the time to implement the dynamic loader, I would like
to use postgress without the dynamic loader. My question is,
therefore, how usable is postgres without the dynamic loader? 

On a related note, I think I remember reading of a HP/UX 
implementation of postgres using shared libraries instead
of the dynamic loader. If shared libraries are as functional
as the dynamic loader and more portable, could the postgres
group support this method too? Would a port be easier using
shared libraries instead of mucking around with COFF internals?
(Speaking for only myself, but the COFF internals and dynamic
loaders seem rather daunting.)

thanks,
erik

---------------------------------------------------------------
Erik van Gilder                 PO Box 1943     
[email-masked]                Fredericksburg, VA 22401

---

From: [email-masked] (Paul M. Aoki)
Date: Wed, 15 Sep 93 12:50:53 -0700

> therefore, how usable is postgres without the dynamic loader? 

the answer, i'm afraid, is that it depends on what you want to do.
if you don't intend to use user-defined types, or are willing to
compile your type functions into the server, then there isn't any 
problem ..

> loaders seem rather daunting.)

andrew yu recently converted the dynamic loader interface to 
assume a dlopen()-style interface.

the up sides are:
- it's pretty fast on most systems -- faster than ld -A.
- since most major versions of unix support some kind of shared 
library interface this is a major portability win.  (he wrote an 
emulator for ultrix.)

the down sides are:
- some shared library implementations are moderately broken.  sunos4 
has a few known problems in this regard (though i haven't yet bumped 
into them myself).
- this pushes some link-editing complexity from inside of postgres
into the user's lap, since the user gets to create loadable shared 
libraries.  (there is sufficient wackiness in some interfaces that 
it's hard to automate reliably.)  on most systems this is pretty 
easy.  on aix (and svr4, i think) the appropriate link-editing can 
be a real pain. :-P  and nobody, but NOBODY, has the same ld flags 
to create shared libraries.
- almost everyone has a slightly different load mechanism ("load"
on aix, "shl_open" on hpux, "dlopen" on sun/alpha, ...).  still, 
it's better than trying to understand COFF/ECOFF/a.out/...
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  [email-masked]
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki