Compatibility: preserve root cause on connection timeouts with PG16 parameters
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 18/100
Research direction
The issue names no file, function or test. Start by reproducing the problem with a multi-host PostgreSQL DSN that uses target_session_attrs or sslnegotiation, and find where the connection fallback loop catches and re-raises errors. Done would mean the original timeout is chained or preserved in the traceback, which the maintainers would need to agree on first, since the expected behaviour is not yet specified.
Written by the indexing model from the issue text.
Description
Hi everyone,
While working with PostgreSQL 16 multi-host DSNs that utilize newer connection parameters like target_session_attrs or sslnegotiation, we noticed that fallback connection attempts can sometimes obscure the original root cause during network timeouts. This can occasionally make diagnosing connectivity issues in clustered environments a bit trickier than necessary.
Environment
- Python 3.12
- Linux / Ubuntu 22.04
- OCA/rest-framework (current main)
- psycopg / psycopg2 (PostgreSQL 16 connection handling)
Steps to Reproduce
- Configure a multi-host PostgreSQL DSN in Odoo utilizing
target_session_attrs=read-writeorsslnegotiation=direct. - Simulate a network timeout or unreachable primary node where fallback logic is triggered.
- Observe the resulting exception traceback.
Expected Behavior
The underlying root cause and original timeout exception should be preserved or clearly chained in the traceback to facilitate faster debugging.
Actual Behavior
The original network timeout context can sometimes be swallowed during the fallback iteration across connection attempts.
Happy to submit a quick PR for this if the maintainers are open to it!
Reported by Usman Ghias · Senior Systems & Backend Architect · Open for Select Senior Remote & Consulting Roles
- Dominant language
- Python
- Stars
- 385
- Forks
- 393
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 21
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OCA/rest-framework
-
bug stale
Difficulty 1/5 Under an hour Newbie friendliness 72/100
OCA/rest-framework#612 · 4 comments ·
Maintainers usually reply within 1 day
-
help wanted no stale work in progress
Difficulty 4/5 3-5 days Newbie friendliness 35/100
OCA/rest-framework#648 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 12/100
OCA/rest-framework#621 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
OCA/rest-framework#617 · 2 comments ·
Maintainers usually reply within 1 day
-
Migration to version 19.0Possibly taken @Churnika-Chaudhari claimed this 21 days ago. Openhelp wanted no stale work in progress
Difficulty 4/5 3-5 days Newbie friendliness 25/100
OCA/rest-framework#567 · 3 comments ·
Maintainers usually reply within 1 day
All issues in OCA/rest-framework
Similar issues
-
plot_graph crashes when a mesh node has no m2m edgePossibly taken @tygvi claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
mllam/neural-lam#883 · 1 comment ·
Maintainers usually reply within 2 days
-
enhancement possible-duplicate
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
AOSSIE-Org/PictoPy#1715 · 2 comments ·
Maintainers usually reply within 6 days
-
SQLite connector omits generated columns from the catalog, and drops relationships sourced on themOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
NVIDIA/auto-ontology#511 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ethereum/execution-specs#3996 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
cpp-best-practices/project_validator#267 ·
Maintainers usually reply within 1 day