On Tue, May 30, 2017 at 9:40 AM, Sandro Santilli <s...@kbt.io> wrote: > On Tue, May 30, 2017 at 04:39:01PM +1000, Nyall Dawson wrote: >> On 30 May 2017 at 16:30, Radim Blazek <radim.bla...@gmail.com> wrote: >> > Hi, >> > >> > QGIS3 crashes when a vector is dragged and drop to PostGIS in browser >> > in qgspostgresconn.cpp on >> > >> > // sharing connection between threads is not safe >> > // See https://issues.qgis.org/issues/13141 >> > Q_ASSERT( QApplication::instance()->thread() == >> > QThread::currentThread() ); >> > >> > the issue mentioned above is about something different (loading items >> > in thread) and it is marked as resolved. >> >> Works OK here if I remove that assert... can you test and confirm that >> it's safe to remove? I don't know the history here... > > IIRC that comment was mine, and was there because the PostgreSQL > connection pooler was not thread safe so using it from different > thread might cause hard-to-debug issues. If this is confirmed then > the fact you see things working OK is not really reassuring. > > For some reason I think https://github.com/qgis/QGIS/pull/2690 was > also meant to improve that weird shared connection handling by > deprecating some methods.
Calling QgsPostgresConn::connectDb with shared=false should be OK, right? Radim _______________________________________________ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer