Mixing threaded and non-threaded - Mailing list pgsql-hackers

From Steve Atkins
Subject Mixing threaded and non-threaded
Date
Msg-id 20040114064009.GA3324@gp.word-to-the-wise.com
Whole thread Raw
Responses Re: Mixing threaded and non-threaded  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
(I hope this is -hackers appropriate - feel free to point me elsewhere)

I'm using 7.4.1 as the backend to several applications. Until recently,
I've been developing solely single-threaded applications.

I just rebuilt postgresql with --enable-thread-safety, to work with
some multi-threaded code.

When I rebuilt libpq to use threads, I started seeing a bunch of weird
failures in many of the older applications. The change in libpq meant
that libpthread was being dynamically linked into the non-thread-aware
applications, leading to some mutex deadlocks in their signal
handlers, hanging those applications.

There doesn't seem to be any tidy way to build and use both threaded
and non-threaded libpq on the same system (LD_LIBRARY_PATH hacks
aren't really viable for distributed code). Is there something I'm
missing?

(If it's relevant, the OS in question is RedHat Linux, but I'mmaintaining the same suite of apps on several other
architectures.)

Cheers, Steve


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: VACUUM delay (was Re: What's planned for 7.5?)
Next
From: "Mark Cave-Ayland"
Date:
Subject: Re: Suggestions for analyze patch required...