Re: any experience with multithreaded pg apps?

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Mark Harrison <mh(at)pixar(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: any experience with multithreaded pg apps?
Date: 2004-05-17 20:22:47
Message-ID: 40A91F17.4000608@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)Yahoo(dot)com #

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2004-05-17 20:50:39 Re: dbmirror
Previous Message Greg Stark 2004-05-17 20:19:27 Re: Is Linux 2.6.5 kernel good enough for production?