MagicStack / MagicStack/asyncpg
Disconnection from postgres-compatible google cloud AlloyDB instance hangs
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 8.1k
- Fork
- 468
- Merge medio
- 18m
- PR unite (30g)
- 4
Descrizione
- asyncpg version: 0.26.0
- PostgreSQL version: Google AlloyDB, postgres 14.4 compatible
- Do you use a PostgreSQL SaaS? If so, which? Can you reproduce
the issue with a local PostgreSQL install?: I cannot reproduce the issue on a local postgres, no. - Python version: 3.10
- Platform: Macos
- Do you use pgbouncer?: No
- Did you install asyncpg with pip?: Yes
- If you built asyncpg locally, which version of Cython did you use?: NA
- Can the issue be reproduced under both asyncio and
uvloop?: I have not tried to reproduce under uvloop
I am connecting to an AlloyDB instance on Google Cloud (currently, these are available for free testing). I can connect and queries run as expected. However, connection.disconnect() hangs. I cannot reproduce this behavior locally; disconnection happens as expected. Synchronous database work with psycopg2, for example, works as expected.
This code reproduces the behavior I am seeing (running through the alloydb-auth-proxy as is required):
import asyncpg
conn = await asyncpg.connect(ALLOYDB_URI)
conn.disconnect() # hangs
I'll put in a ticket with Google as well if nothing obvious turns up here.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Parti dalla chiamata a connection.disconnect() nella riproduzione fornita di AlloyDB-auth-proxy ed eseguila rispetto alla configurazione Google Cloud AlloyDB segnalata. Confronta il comportamento con un’installazione locale di PostgreSQL e con il comportamento esistente di psycopg2; il lavoro è completato quando viene identificata la causa del blocco e asyncpg si disconnette correttamente per questa configurazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- gcp, postgresql, python
- Ambito
- cloud, databases
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100