Re: Libpq and multithreading

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Asia <asia123321(at)op(dot)pl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Libpq and multithreading
Date: 2013-01-12 00:55:12
Message-ID: 20130112005512.GA3997@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jan 11, 2013 at 04:27:42PM +0100, Asia wrote:
> Hello,
>
> I am trying to use libpq in two threads, the issue is that I am getting access violation after several successful connections.
> Each thread connects to different db and disconnects immediately after making a conenction.
>
> So my question is if this is supported by libpq? Is it possible to use it in more than one thread and make connections at the same time?

Each connection can be created and accessed from only one thread.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Browse pgsql-general by date

  From Date Subject
Next Message T. E. Lawrence 2013-01-12 01:47:26 reducing number of ANDs speeds up query
Previous Message Rich Shepard 2013-01-12 00:30:57 Re: Getting Mysql data into Postgres: least painful methods?