Re: embedded postgresql

From: Christopher Browne <cbbrowne(at)acm(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: embedded postgresql
Date: 2003-11-13 05:04:24
Message-ID: m34qx8q2p3.fsf@wolfe.cbbrowne.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In the last exciting episode, jiniusuk(at)yahoo(dot)co(dot)uk (jini us) wrote:
> It is a shame that postgres is not available as an embedded server
> unlike mysql database server which comes in the form of a dll.

When the postmaster runs as a separate process, this has three major
merits:

1. It takes advantage of the fact that modern operating systems are
quite GOOD at spawning multiple processes. VMS and MVS are
historically _atrociously_ slow at this, but on Windows NT, the
cost of spawning one process can't be _too_ dramatic.

2. It improves reliability since processes using data can't
accidentally corrupt the database process(es).

3. As soon as there is more than one process using data, there is
a savings in memory consumption since the overhead of
establishing dynamic parts of database context only need be paid
once.

That you regard it as a vital "doctrine" that it should be preferable
to embed databases using DLLs does not establish either that:

a) The doctrine is actually valid, or

b) The architecture of PostgreSQL is likely to be changed to conform
to that doctrine.

You might instead investigate the notion of running PostgreSQL as a
separate process, and see if you can find a way to use it, despite the
apparent misfit of expectations. If you fight with PostgreSQL, things
will doubtless go badly. If you try to find a way of cooperating with
its architecture, you might find some pleasant surprises...

> However with mysql licence I would have to pay $10,000 if I wish to
> include it in mysql as an embedded server in my app.

Wow, that is rather expensive. I thought MySQL was supposed to be
"free software," what with being licensed under the GPL and all...
--
wm(X,Y):-write(X),write('@'),write(Y). wm('cbbrowne','cbbrowne.com').
http://www3.sympatico.ca/cbbrowne/postgresql.html
"I'm sorry, the teleportation booth you have reached is not in service
at this time. Please hand-reassemble your molecules or call an
operator to help you...."

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shridhar Daithankar 2003-11-13 06:12:32 Re: PGexec dumps core at pqResultAlloc
Previous Message Ma Siva Kumar 2003-11-13 04:56:59 Re: multibyte support [Resolved]