Re: Passing a PGconn * between two processes on Unix like systems

From: Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>
To: Marc Balmer <marc(at)msys(dot)ch>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Passing a PGconn * between two processes on Unix like systems
Date: 2010-07-22 11:10:53
Message-ID: 6A137B14-159B-4D35-95FA-2220C624E394@solfertje.student.utwente.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 22 Jul 2010, at 8:35, Marc Balmer wrote:

> When a process forks() and both the parent and child process continue to
> use a previously opened PGconn * structure, is that behaviour defined?

I recall having done this successfully, but you have to take care to synchronise access to the connection. You can't have multiple transactions running in parallel on one connection.

Alban Hertroys

--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.

!DSPAM:737,4c482748286211410335719!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stefan-Michael Guenther 2010-07-22 11:50:25 Getting statistics for each sql statement?
Previous Message Oliver Kohll - Mailing Lists 2010-07-22 09:02:47 Re: locating cities within a radius of another