Re: dynamic loading of .so

From: "Cristian Prieto" <cristian(at)clickdiario(dot)com>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "'Douglas McNaught'" <doug(at)mcnaught(dot)org>
Cc: <tjo(at)acm(dot)org>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: dynamic loading of .so
Date: 2005-10-17 13:54:08
Message-ID: 00ca01c5d322$3f897910$6500a8c0@gt.ClickDiario.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

You are talking about a shmem block using by the backend, right? Or about my
"own" shmem block?. I'm very interested in the implementation of a
"constants" like functionality to pgsql, but I don't know where to start
with... Any help or ideas?

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Domingo, 16 de Octubre de 2005 10:42 p.m.
To: Douglas McNaught
Cc: cristian(at)clickdiario(dot)com; tjo(at)acm(dot)org; pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] dynamic loading of .so

Douglas McNaught <doug(at)mcnaught(dot)org> writes:
> <cristian(at)clickdiario(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-10-17 13:57:58 Re: [GENERAL] Postgres logs to syslog LOCAL0
Previous Message Thomas Hallgren 2005-10-17 13:45:37 Re: Oracle buys Innobase