René's URL Explorer Experiment


Title: Raise an error when a busy connection is used by Cito · Pull Request #117 · PyGreSQL/PyGreSQL · GitHub

Open Graph Title: Raise an error when a busy connection is used by Cito · Pull Request #117 · PyGreSQL/PyGreSQL

X Title: Raise an error when a busy connection is used by Cito · Pull Request #117 · PyGreSQL/PyGreSQL

Description: Using a connection while one of its commands was still running, e.g. from a notice receiver, from the iterable passed to inserttable() or from another thread, entered libpq re-entrantly and could hang or crash. Closes #115. Main changes: The connection has a busy flag that is set around all libpq calls that communicate with the server (queries, prepared statements, COPY, inserttable(), large objects, source objects, reset(), poll(), getnotify() and fetching asynchronous results). Commands on a busy connection raise an InterfaceError. This replaces the guard that only covered asynchronous queries. cancel() can still be called from another thread, and callbacks in the same thread (notice receiver, inserttable() iterable) can still use the methods that only return local information, like transaction(), parameter() and the escape methods. close() marks the connection as closed before releasing the GIL, and source.execute() keeps the result of a running COPY when the command is rejected. DB.close() and DB.reopen() keep the cast hook when closing fails, and pgdb's commit() and rollback() no longer mark the transaction as ended when the command could not be sent.

Open Graph Description: Using a connection while one of its commands was still running, e.g. from a notice receiver, from the iterable passed to inserttable() or from another thread, entered libpq re-entrantly and could h...

X Description: Using a connection while one of its commands was still running, e.g. from a notice receiver, from the iterable passed to inserttable() or from another thread, entered libpq re-entrantly and could h...

Opengraph URL: https://github.com/PyGreSQL/PyGreSQL/pull/117

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:a29cd7f7-ad0f-bae9-f82d-ae35d3d687d8
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA518:3D1C6E:1ED074:2B3FAD:6B04681D
html-safe-nonce05dbd0220f469a5ae793f1feb59cdaaccb6fb199b101600a5813a038632bc11d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTE4OjNEMUM2RToxRUQwNzQ6MkIzRkFEOjZCMDQ2ODFEIiwidmlzaXRvcl9pZCI6IjE4NTQ0ODgxODM1MjI0ODYzMDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac9d66ce53ebbca322c2c644f46d639f64adc0c3668c9e8e398f4fcf86160cd01a
hovercard-subject-tagpull_request:5440318413
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/PyGreSQL/PyGreSQL/pull/117/files
twitter:imagehttps://avatars.githubusercontent.com/u/464599?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/464599?s=400&v=4
og:image:altUsing a connection while one of its commands was still running, e.g. from a notice receiver, from the iterable passed to inserttable() or from another thread, entered libpq re-entrantly and could h...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None83e4c0e58c5162177f3c161c5fbad38527ae04c11ac14980f9f9d85ae2027b1f
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/PyGreSQL/PyGreSQL git https://github.com/PyGreSQL/PyGreSQL.git
octolytics-dimension-user_id60857770
octolytics-dimension-user_loginPyGreSQL
octolytics-dimension-repository_id51212044
octolytics-dimension-repository_nwoPyGreSQL/PyGreSQL
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id51212044
octolytics-dimension-repository_network_root_nwoPyGreSQL/PyGreSQL
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseca4d07a7cef4e4b75f821dc25e7300d80c1450a9
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/PyGreSQL/PyGreSQL/pull/117/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPyGreSQL%2FPyGreSQL%2Fpull%2F117%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPyGreSQL%2FPyGreSQL%2Fpull%2F117%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=PyGreSQL%2FPyGreSQL
Reloadhttps://github.com/PyGreSQL/PyGreSQL/pull/117/files
Reloadhttps://github.com/PyGreSQL/PyGreSQL/pull/117/files
Reloadhttps://github.com/PyGreSQL/PyGreSQL/pull/117/files
PyGreSQLhttps://github.com/PyGreSQL
PyGreSQLhttps://github.com/PyGreSQL/PyGreSQL
Codehttps://github.com/PyGreSQL/PyGreSQL
Issues21 (21)https://github.com/PyGreSQL/PyGreSQL/issues
Pull requests1 (1)https://github.com/PyGreSQL/PyGreSQL/pulls
Actionshttps://github.com/PyGreSQL/PyGreSQL/actions
Projectshttps://github.com/PyGreSQL/PyGreSQL/projects
Security and qualityhttps://github.com/PyGreSQL/PyGreSQL/security
Insightshttps://github.com/PyGreSQL/PyGreSQL/insights
Sign up for GitHub https://github.com/signup?return_to=%2FPyGreSQL%2FPyGreSQL%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FPyGreSQL%2FPyGreSQL%2Fissues%2Fnew%2Fchoose
Citohttps://github.com/Cito
mainhttps://github.com/PyGreSQL/PyGreSQL/tree/main
fix-busy-connectionhttps://github.com/PyGreSQL/PyGreSQL/tree/fix-busy-connection
Conversation 0 https://github.com/PyGreSQL/PyGreSQL/pull/117
Commits 2 https://github.com/PyGreSQL/PyGreSQL/pull/117/commits
Checks 34 https://github.com/PyGreSQL/PyGreSQL/pull/117/checks
Files changed https://github.com/PyGreSQL/PyGreSQL/pull/117/files
Please reload this pagehttps://github.com/PyGreSQL/PyGreSQL/pull/117/files
Raise an error when a busy connection is used https://github.com/PyGreSQL/PyGreSQL/pull/117/files#top
Show all changes 2 commits https://github.com/PyGreSQL/PyGreSQL/pull/117/files
98ecbd0 Raise an error when a busy connection is used Cito Nov 22, 2026 https://github.com/PyGreSQL/PyGreSQL/pull/117/commits/98ecbd06afa652b87be41f347c0aabd77410d7c4
33e1569 Keep the state when closing or committing fails Cito Nov 22, 2026 https://github.com/PyGreSQL/PyGreSQL/pull/117/commits/33e1569c3154d60900d05414f0bd95fee7b6abcd
Clear filters https://github.com/PyGreSQL/PyGreSQL/pull/117/files
Please reload this pagehttps://github.com/PyGreSQL/PyGreSQL/pull/117/files
Please reload this pagehttps://github.com/PyGreSQL/PyGreSQL/pull/117/files
changelog.rst https://github.com/PyGreSQL/PyGreSQL/pull/117/files#diff-af89d17b84a7470a2e9662d1d1281c96a163ba0c438e476656c4a336a19a120a
connection.rst https://github.com/PyGreSQL/PyGreSQL/pull/117/files#diff-0b7ab17d59f667ebde70e7819052215cc2038f9f962ec11899ebb789d53c9eb4
pgconn.c https://github.com/PyGreSQL/PyGreSQL/pull/117/files#diff-76d5e50175ea5e709b86a504514fa7ae601a46708bb9695f992be5ca24ca825c
pglarge.c https://github.com/PyGreSQL/PyGreSQL/pull/117/files#diff-9ea83b3f4c9fed00cea7b261eb9d29ee00abeb108db42ccc74ca6262c21bbeef
pgmodule.c https://github.com/PyGreSQL/PyGreSQL/pull/117/files#diff-1871ef558de66b409c30a8ec7e78c75f08f174d400d9604ddb33aeb67ed37c99
pgmodule.h https://github.com/PyGreSQL/PyGreSQL/pull/117/files#diff-e36bed65cc38c313f2d4d3c4607fc54ee489733d37930e892724f74280a84949
pgquery.c https://github.com/PyGreSQL/PyGreSQL/pull/117/files#diff-e328485ecc0a3c7b4abcc1b68c3e4fdf1ad8b4c95e51ae163fc6c493d93ed589
pgsource.c https://github.com/PyGreSQL/PyGreSQL/pull/117/files#diff-7042504f558efdc0ac433caa57d35e564a46195bb05794ea03d43ac931136f02
db.py https://github.com/PyGreSQL/PyGreSQL/pull/117/files#diff-69568049815164a8736eeb69d9e57b62da5a3edc75bfcfd2285a7145611f713d
connection.py https://github.com/PyGreSQL/PyGreSQL/pull/117/files#diff-19d10a7bb83996e8f60b2af9f61a5e73355d955a7d0c6c39a350bd73c7d32602
test_classic_connection.py https://github.com/PyGreSQL/PyGreSQL/pull/117/files#diff-9b052effc94d524f305b86b8024d6f47492a16e1870599628e0a15d719942f06
test_classic_dbwrapper.py https://github.com/PyGreSQL/PyGreSQL/pull/117/files#diff-17a518e29c7197473b0a85feada64b6eef8893c64ab02f0059fee68b112bd340
test_dbapi20.py https://github.com/PyGreSQL/PyGreSQL/pull/117/files#diff-785635aa058145400ce9f284bbb47d6a8bcbeabc2f2f707aafe5fa87422263ca
docs/contents/changelog.rsthttps://github.com/PyGreSQL/PyGreSQL/pull/117/files#diff-af89d17b84a7470a2e9662d1d1281c96a163ba0c438e476656c4a336a19a120a
View file https://github.com/PyGreSQL/PyGreSQL/blob/33e1569c3154d60900d05414f0bd95fee7b6abcd/docs/contents/changelog.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/PyGreSQL/PyGreSQL/pull/117/{{ revealButtonHref }}
https://github.com/PyGreSQL/PyGreSQL/pull/117/files#diff-af89d17b84a7470a2e9662d1d1281c96a163ba0c438e476656c4a336a19a120a
https://github.com/PyGreSQL/PyGreSQL/pull/117/files#diff-af89d17b84a7470a2e9662d1d1281c96a163ba0c438e476656c4a336a19a120a
docs/contents/pg/connection.rsthttps://github.com/PyGreSQL/PyGreSQL/pull/117/files#diff-0b7ab17d59f667ebde70e7819052215cc2038f9f962ec11899ebb789d53c9eb4
View file https://github.com/PyGreSQL/PyGreSQL/blob/33e1569c3154d60900d05414f0bd95fee7b6abcd/docs/contents/pg/connection.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/PyGreSQL/PyGreSQL/pull/117/{{ revealButtonHref }}
https://github.com/PyGreSQL/PyGreSQL/pull/117/files#diff-0b7ab17d59f667ebde70e7819052215cc2038f9f962ec11899ebb789d53c9eb4
https://github.com/PyGreSQL/PyGreSQL/pull/117/files#diff-0b7ab17d59f667ebde70e7819052215cc2038f9f962ec11899ebb789d53c9eb4
https://github.com/PyGreSQL/PyGreSQL/pull/117/files#diff-0b7ab17d59f667ebde70e7819052215cc2038f9f962ec11899ebb789d53c9eb4
https://github.com/PyGreSQL/PyGreSQL/pull/117/files#diff-0b7ab17d59f667ebde70e7819052215cc2038f9f962ec11899ebb789d53c9eb4
https://github.com/PyGreSQL/PyGreSQL/pull/117/files#diff-0b7ab17d59f667ebde70e7819052215cc2038f9f962ec11899ebb789d53c9eb4
Please reload this pagehttps://github.com/PyGreSQL/PyGreSQL/pull/117/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.