[Qgis-developer] Re: Connection reusing in postgres provider

Jürgen E. Fischer jef at norbit.de
Sun Mar 9 18:31:18 EDT 2008


Hi Marco,

On Sun, 09. Mar 2008 at 17:15:56 +0100, Marco Hugentobler wrote:
> There is a problem with the reusage of connections in postgres provider (via 
> static member variable QgsPostgresProvider::connections). Two postgres layers 
> that share the same connection might influence each others binary cursors. As 
> a binary cursors is valid inside a transaction, calling "end work" on a 
> connection will also influence the cursor of the second layer.

Right.  Either we need a WITH HOLD when declaring the cursor or drop
connection pooling alltogether.  The later is probably a necessity
anyway, if we want to introduce feature locking.

I'll try that and Steven's patch tomorrow.


Jürgen

-- 
Jürgen E. Fischer         norBIT GmbH               Tel. +49-4931-918175-0
Dipl.-Inf. (FH)           Rheinstraße 13            Fax. +49-4931-918175-50
Software Engineer         D-26506 Norden               http://www.norbit.de

-- 
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502



More information about the Qgis-developer mailing list