Re: any experience with multithreaded pg apps? - Mailing list pgsql-general

From Jan Wieck
Subject Re: any experience with multithreaded pg apps?
Date
Msg-id 40A91F17.4000608@Yahoo.com
Whole thread Raw
In response to any experience with multithreaded pg apps?  (Mark Harrison <mh@pixar.com>)
List pgsql-general
Mark Harrison wrote:

> I'm looking for feedback from anybody who has used pg in a
> multi-threaded program, particularly one in which several
> threads each open a database connection.
>
> It's documented to work in that scenario, but I'm interested
> in anybody who can share some real-world with that.

Take a look at Slony-I.

Multithreaded client applications are a headache for themself, since the
PostgreSQL client libraries are not built threadsafe by default, cannot
be built threadsafe on all platforms, and even if we thought about some
platforms being threadsafe buildable, some underlying authentication
libs are sometimes not. Someone testing Slony was lately bitten by a
non-threadsafe libkrb5 even if he does not use kerberos authentication
at all. Having libpq linked against it was enough to coredump slon.

It's more or less a nightmare, and we definitely need to cleanup that
mess anytime soon.


Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #


pgsql-general by date:

Previous
From: Greg Stark
Date:
Subject: Re: Is Linux 2.6.5 kernel good enough for production?
Next
From: Andrew Sullivan
Date:
Subject: Re: dbmirror