Justin Banks <justinb@tricord.com> writes:
> You're right - this only works because the shared connections all
> occur in the same address space. It doesn't buy you anything between
> applications, only inside an application. The problem is that there's
> no way for different instantiations of classes inheriting
> database-ness from the PgDatabase class to share a PGconn* unless the
> PgDatabase class provides a way for different instantiations to know
> that existing connections are available.
And what's wrong with a static class variable for that purpose?
The shmem segment looks like the hardest possible way to get the
same result.
regards, tom lane