Return-Path: postman 
Delivery-Date: Wed, 15 Sep 93 12:57:22 PDT
Return-Path: postman
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA18828; Wed, 15 Sep 93 12:50:29 -0700
Resent-From: postman (POSTGRES mailing list)
Resent-Message-Id: <9309151950.AA18828@postgres.Berkeley.EDU>
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: aoki@postgres.Berkeley.EDU
Received: from faerie.CS.Berkeley.EDU by postgres.Berkeley.EDU (5.61/1.29)
	id AA18820; Wed, 15 Sep 93 12:50:24 -0700
Received: from localhost (localhost [127.0.0.1]) by faerie.CS.Berkeley.EDU (8.1C/8.1B) with SMTP id MAA07371; Wed, 15 Sep 1993 12:50:53 -0700
Message-Id: <199309151950.MAA07371@faerie.CS.Berkeley.EDU>
From: aoki@postgres.berkeley.edu (Paul M. Aoki)
To: erik vangilder <evangild@s850.mwc.edu>
Cc: postgres@postgres.berkeley.edu
Subject: Re: is postgres without dynamic load ok? 
In-Reply-To: Your message of Wed, 15 Sep 93 14:36:02 EDT 
	     <9309151834.AA17806@postgres.Berkeley.EDU> 
Date: Wed, 15 Sep 93 12:50:53 -0700
X-Sender: aoki@postgres.Berkeley.EDU
X-Mts: smtp
Resent-To: postgres-dist
Resent-Date: Wed, 15 Sep 93 12:50:27 PDT

erik vangilder <evangild@s850.mwc.edu> writes:
> 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? 

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 ..

> 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.)

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  |  aoki@postgres.Berkeley.EDU
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki
