X-Original-To: pgsql-interfaces@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 1E140474E44 for ; Thu, 27 Mar 2003 13:37:49 -0500 (EST) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id 9507E4762F1 for ; Thu, 27 Mar 2003 13:37:46 -0500 (EST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id h2RIbej03860; Thu, 27 Mar 2003 13:37:40 -0500 (EST) From: Bruce Momjian Message-Id: <200303271837.h2RIbej03860@candle.pha.pa.us> Subject: Re: Is PGconn* thread safe? In-Reply-To: <3E833E5F.6090107@kencast.com> To: Wei Weng Date: Thu, 27 Mar 2003 13:37:40 -0500 (EST) Cc: pgsql-interfaces@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, hits=-26.0 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200303/167 X-Sequence-Number: 3916 They are not thread-safe but each connection can have its own PGconn. --------------------------------------------------------------------------- Wei Weng wrote: > Can I use two threads to use one PGconn* or do I have to assign them > each one with a unique PGconn*? > > I searched in the mailing list archive, but couldn't find anything > recent that has mentioned the thread safeness of libpq/PGconn*. > > Thanks a lot! > > Wei > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073