Support for disabling transactions
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by tracing the create_pool and pool.acquire usage shown in the issue, then compare it with the connection.transaction behavior. Reproduce the workload against a local CrateDB instance and identify where implicit transaction commands are issued. Done means a supported way exists to disable that behavior so the shown insert does not fail on CrateDB.
Written by the indexing model from the issue text.
Description
- asyncpg version: 0.28.0
- PostgreSQL version: CrateDB 5.4.2 https://github.com/crate/crate
- Do you use a PostgreSQL SaaS? If so, which? Can you reproduce
the issue with a local PostgreSQL install?: Using CrateDB locally - Python version: 3.11.4
- Platform: Linux arm64
- Do you use pgbouncer?: No
- Did you install asyncpg with pip?: Yes
- If you built asyncpg locally, which version of Cython did you use?: 0.29.36
- Can the issue be reproduced under both asyncio and
uvloop?: Yes
It would be really useful to be able to disable transaction support for Postgres-like database systems that don't support transactions.
CrateDB is an OLAP database with Postgres Wire Protocol support, however it does not have support for transactions. (BEGIN is a no-op, but ROLLBACK is an undefined term and causes issues)
Currently using asyncpg like this:
asyncpg_pool = await asyncpg.create_pool(**CRATE_DB_CONFIG, loop=loop, max_size=10)
async with asyncpg_pool.acquire() as connection:
await connection.execute("""insert into some_table (event_time, field1, field2) values ($1, $2, $3);""", datetime.now(), user_id, session_id)
I'm deliberately avoiding any connection.transaction() calls yet asyncpg still appears to wrap everything in a transaction block.
- Dominant language
- Python
- Stars
- 8.1k
- Forks
- 469
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 9
Contributor guide
No contributing guide indexed for this repository
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 MagicStack/asyncpg
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MagicStack/asyncpg#1357 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
MagicStack/asyncpg#1354 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
MagicStack/asyncpg#1342 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 56/100
MagicStack/asyncpg#1340 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 28/100
MagicStack/asyncpg#1337 ·
All issues in MagicStack/asyncpg
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
canonical/paas-charm#368 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
tech debt
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
StevenBlack/hosts#3256 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
qualcomm/qai-appbuilder#275 ·