Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Postgis: Concurrency problem with CursorResultSet #1588

rcoup opened this Issue · 5 comments

3 participants



while trying to implement parallelism with asynchronous queries (#849), I ran into a curious thing in the Postgis plugin.

In the function features() implemented in postgis_datasource.cpp, the first thing done is to borrow a connection from the connection pool. Later, the method get_resultset is called with this connection, and if the datasource is supposed to use a cursor, it returns a CursorResultSet object, with the connection. Then the connection is given back to the pool, thanks to the PoolGuard.

The strange thing is that the CursorResultSet still uses the connection (in method getNextResultSet, called by next) after it has been given back. Am I right ?

Does somebody use postgis cursors in a concurrency context ? Has anybody ever had issues with that ?

Looks valid to me after a review



we've started working on parallelization of datasource queries, which fixes this bug. It is not in the master and still needs some work to be merged, but you can have a look at our repo : , and comments about the code : Mappy#1


excellent, thanks for the update!


@rcoup - had a chance to work on this yet?


Fixed by #1823

@rcoup rcoup closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.