This was the problem I was having a few months ago before 2.2 was released. I would run queries and they would never disappear on the server. So eventually the queries would stop running as the number of connections reached 100.
I only got around it by adding layers and specifying that the layer does not look for styles in the PostGIS database (the False at the end there). vlayer = QgsVectorLayer(uri.uri(), layerName, "postgres", False) I don't know if it is related to the code that looks for styles in the database, and if doesn't find one it doesn't shut down the connection? James -----Opprinnelig melding----- Fra: [email protected] [mailto:[email protected]] På vegne av Giovanni Manghi Sendt: 10. april 2014 13:46 Til: [email protected] Emne: Re: [Qgis-developer] working with qgis and pgadmin/psql... > > Yes - here's some more info/bug reports: > > http://hub.qgis.org/issues/7679 > > http://osgeo-org.1560.x6.nabble.com/Issue-with-standalone-python-scrip > t-and-PostGIS-Layers-td5098329.html > > http://hub.qgis.org/issues/9357 I see now that in "pgadmin -> tools -> server status" there are a lot of locks after adding postgis layers in qgis and that they do disappear only when closing qgis itself. Pressing "new project" does not remove the locks. _______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer _______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
