Re: dynamic loading of .so - Mailing list pgsql-general

From Tom Lane
Subject Re: dynamic loading of .so
Date
Msg-id 12614.1129524137@sss.pgh.pa.us
Whole thread Raw
In response to Re: dynamic loading of .so  (Douglas McNaught <doug@mcnaught.org>)
Responses Re: dynamic loading of .so  ("Cristian Prieto" <cristian@clickdiario.com>)
List pgsql-general
Douglas McNaught <doug@mcnaught.org> writes:
> <cristian@clickdiario.com> writes:
>> are there any way to make them global for all the instances?

> Put them in shared memory.  This probably isn't trival, as all the
> shared memory is allocated up front and used for existing purposes (at
> least, as I understand it).

There's a "slop factor" of 100KB or so in the shared memory size
calculation, which means that an add-on library that requests space soon
enough could probably get away with allocating up to a few KB without
causing any problems.  (The slop is not totally useless, since for
instance the lock manager might eat it up if more locks get requested
than expected.)

In the long run it might be interesting to add hooks that allow
preloaded libraries to contribute to the shmem sizing calculation and
then to snarf up the space they've requested before it can get eaten by
the lockmgr.

            regards, tom lane

pgsql-general by date:

Previous
From: Rick Morris
Date:
Subject: Re: Anybody using PostGIS?
Next
From: "Andy Astor"
Date:
Subject: Re: [pgsql-advocacy] Oracle buys Innobase