Subject: Re: Threading problems
To: Jaromir Dolecek <jdolecek@NetBSD.org>
From: Bill Studenmund <firstname.lastname@example.org>
Date: 11/23/2004 19:08:13
Content-Type: text/plain; charset=us-ascii
On Tue, Nov 23, 2004 at 10:05:55PM +0100, Jaromir Dolecek wrote:
> Bill Studenmund wrote:
> -- Start of PGP signed section.
> > On Tue, Nov 23, 2004 at 08:47:38PM +0100, Jaromir Dolecek wrote:
> > >=20
> > > Yeah, the libpthread lossage is becoming quite a big problem. Is there
> > > no way to avoid the crash when loading threaded object module
> > > to non-threaded application? We urgently need to come up with
> > > pkgsrc solution for this.
> > No, there is no way to avoid the crash. Please see the follow-up I post=
> > to darcy@. The server needed to have been compiled with libpthread from=
> > the beginning.
> But PostgreSQL server itself does not use threads at all, it's using fork=
> and shared memory.
The modules it loads want to use pthreads, so it has to be pthread-safe.=20
Given that they want to be threaded, it will end up being one of many=20
threads. Thus it still needs to do locking...
One thing which might be interesting would be if modules that don't really=
need threads but want to be thread safe would use something like=20
threadlib. Either that or we may want to matrix loadable modules (this is=
the threaded one, this is the unthreaded one...)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)
-----END PGP SIGNATURE-----