From: Goran Thyni <goran@bildbasen.se>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: thread-safe libpq and DBD::Pg
Date: Sun, 09 Aug 1998 08:16:36 +0000
Message-ID: <35CD5AE4.DE2DF2B8@bildbasen.se> (raw)
References: <1623.902601037@sss.pgh.pa.us>
Tom Lane wrote:
>
> Goran Thyni <goran@bildbasen.se> writes:
> > Has anyone any experience of the thread-safeness of libpq?
>
> PQconnectdb() is not thread-safe, because it scribbles temporary
> data in the static PQconninfoOptions array. You can get around
> that easily enough by not using PQconnectdb (or PQconndefaults)
> --- use PQsetdbLogin() instead. In any case the problem exists
> only if different threads try to open database connections
> at the same time.
> [...}
Tom,
thanks for the reply.
DBD::Pg dos indeed use PQconnectdb(),
but at least in my light test I get SEGV in $sth->fetch.
The problems are probably somewhere in DBDI or DBD::Pg or
somewhere in the interaction of the parts.
I am looking into how much work a "pure Perl" interface
should amount to. Using native perl IO and pgsql-fe/be-protocol
should make "pgsql-clienting" even more portable over platforms.
regards,
Göran
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: goran@bildbasen.se, tgl@sss.pgh.pa.us
Subject: Re: thread-safe libpq and DBD::Pg
In-Reply-To: <35CD5AE4.DE2DF2B8@bildbasen.se>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox