Re: [GENERAL] Libpq and multithreading

2013-01-19 Thread Ashesh Vashi
A back-trace would definitely be helpful to analyze the issue. -- Thanks & Regards, Ashesh Vashi EnterpriseDB INDIA: Enterprise PostgreSQL Company *http://www.linkedin.com/in/asheshvashi* On Fri, Jan 18, 2013 at 7:35 PM, A

Re: [GENERAL] Libpq and multithreading

2013-01-18 Thread Asia
I am sure that I am using seperate threads with seperate connection objects and libpq is compiled to be threadsafe. I get access violation both with ssl and without it (without ssl it seems to be more stable, however afer several hundred connects/disconnects it fails). J. -- Sent via pgsql-ge

Re: [GENERAL] Libpq and multithreading

2013-01-17 Thread Merlin Moncure
On Mon, Jan 14, 2013 at 9:57 AM, Asia wrote: > It is not possible because connection is local variable in both thread > functions, no common variables are used. > > I checked that it also crashes without SSL. Two threads connecting to the > same server, different databases. hm, where is your li

Re: [GENERAL] Libpq and multithreading

2013-01-16 Thread Asia
It is not possible because connection is local variable in both thread functions, no common variables are used. I checked that it also crashes without SSL. Two threads connecting to the same server, different databases. Joanna -- Sent via pgsql-general mailing list (pgsql-general@postgresql.

Re: [GENERAL] Libpq and multithreading

2013-01-14 Thread Merlin Moncure
On Mon, Jan 14, 2013 at 8:28 AM, Alban Hertroys wrote: > An access violation means that you're trying to access memory that doesn't > belong to your process. I'm not sure where it's originating, that could be > the server but I suspect the issue is at the client-side. > > You're probably just forg

Re: [GENERAL] Libpq and multithreading

2013-01-14 Thread Alban Hertroys
An access violation means that you're trying to access memory that doesn't belong to your process. I'm not sure where it's originating, that could be the server but I suspect the issue is at the client-side. You're probably just forgetting to free memory somewhere. On 14 January 2013 13:50, Asia

Re: [GENERAL] Libpq and multithreading

2013-01-14 Thread Asia
I am using 2 threads, each declares seperate PGconn conenction object. It connects e.g. 60 times, one connection from one thread, the other connection from the other thread, usually one after each other. And it fails at 61'st connection with access violation. I already tried with PQconnect and P

Re: [GENERAL] Libpq and multithreading

2013-01-11 Thread Bruce Momjian
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. > >