-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
[Postgres] Use session role for ALL requests #61386
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
Conversation
🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. 🪟 Windows buildsDownload Windows builds of this PR for testing. |
7c2f8ff
to
669f503
Compare
Adds session_role to the connection information so: - It's automatically used for every request. The old system was only working for provider requests and was error prone because it was easy to forget to set the session role before the request. - Avoid setting/resetting role request if different request sender were sharing the same connection information to the exception of the session role. Fixes qgis#58516
The backport to
stderr
stdout
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-queued_ltr_backports queued_ltr_backports
# Navigate to the new working tree
cd .worktrees/backport-queued_ltr_backports
# Create a new branch
git switch --create backport-61386-to-queued_ltr_backports
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick c2b3c5a42f997f5a5fdbc20b3f79ec48e4db3eae
# Push it to GitHub
git push --set-upstream origin backport-61386-to-queued_ltr_backports
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-queued_ltr_backports Then, create a pull request where the |
The backport to
stderr
stdout
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release-3_42 release-3_42
# Navigate to the new working tree
cd .worktrees/backport-release-3_42
# Create a new branch
git switch --create backport-61386-to-release-3_42
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick c2b3c5a42f997f5a5fdbc20b3f79ec48e4db3eae
# Push it to GitHub
git push --set-upstream origin backport-61386-to-release-3_42
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release-3_42 Then, create a pull request where the |
Adds session_role to the connection information so:
New contribution would have to use the new QgsPostresConn::connectionInfo() method to avoid new issue. I can see no way to enforce this instead of adding session role to QgsDataSourceUri (which has been already refused before, and IMHO for good reasons)
FYI @rldhont
Fixes #58516
Funded by Les agences de l'eau - DSIUN