-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Survive lack of permissions on pointcloud_columns #33118
Conversation
70abd5a
to
bd0cf01
Compare
I'm thinking that another way to deal with the permission thing would be to use a DO block that creates a cursor and then fetch from ALL (or partial) from the cursor. Advantage of that is that permissions would be checked on a table-by-table basis instead that from the whole metadata (affects not only topology but any table that can be seen in catalogs but not read for fetching srid/type etc.). Also, it would theoretically allow for interruption of the long-running query (if FETCH is used in blocks). What do you think about this approach @jef-n ? |
bd0cf01
to
5cd2490
Compare
I'm back with the problem of being unable to trigger a reconnection from those python-obtained connections :/ |
@elpaso what about adding a parameter to providerMetadata returned object's |
3af7d7b
to
3941e52
Compare
It makes no sense to me: But as we have already discussed some time ago I suspect that you are misinterpreting what those "connections" are about: these are not low level DB connections (that are handled by the provider) but rather wrappers for QGIS settings stored connection configurations, the real backend connection is handled by the provider. The I strongly believe that low level connection/reconnection/errors etc. should be handled by the provider and the only interaction with client code should be exceptions thrown in case of unrecoverable errors. |
@elpaso there are cases in which the caller wants to have a new low-level connection, because the provider may be doing something at connection time (this is the case for PostgreSQL connections). |
No: it's not client code responsibility to handle low level connections and to know what's going on inside the provider, the provider must do that. That said, see: QgsPostgresProviderConnection::executeSqlPrivate QgsPostgresConn *conn = QgsPostgresConnPool::instance()->acquireConnection .... |
26fd3f6
to
1884dcb
Compare
Right, so it's the pool itself that keeps those connections active. I guess I could use some env variable to disable pooling... |
There seem to be some confusion with connection pools:
@m-kuhn according to ChangeLog you added QgsApplication::maxConcurrentConnectionsPerPool() in 2018, but that function now returns a constant value and there's no way to set that value ? |
IIRC I think I just changed the max number of connections and added a couple of "backup connections" to recover in some cases. I don't think I can help here right now... |
7aba3fc
to
245b32b
Compare
This commit is expected to fail, lacking an actual fix See qgis#32972
c85e62b
to
989c8e5
Compare
Hmm... this seems to break CI.
https://travis-ci.org/qgis/QGIS/jobs/650370964?utm_medium=notification&utm_source=github_status Any chance to switch to a package instead of a custom built module in these tests? |
As things clearly worked as of |
As it suddenly stopped working, I assume it was caused by an upgrade somewhere else (on ubuntu side? postgres docker side?) and just rolling back in time won't help. Feel free to try whatever you think helps. As long as the CI is green by default and helps point out things that are broken in our code I'm happy. |
I'm trying that older commit with #34500 -- I would use packaged pointcloud if we had it. |
The docker is only rebuilt if things changed and then cached. This helps to avoid having to synchronize dependencies between different repositories and isolating code while keeping things fast. If this doesn't work as expected we need to have a look. |
See #32972