MagicStack / MagicStack/asyncpg

Disconnection from postgres-compatible google cloud AlloyDB instance hangs

未關閉
#962 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
Python
星號
8.1k
分支
468
PR 合併指標
30 天內沒有已合併 PR

描述

  • 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.

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從提供的 AlloyDB-auth-proxy 重現中的 connection.disconnect() 呼叫開始,針對回報的 Google Cloud AlloyDB 設定執行它。將其行為與本機 PostgreSQL 安裝和現有的 psycopg2 行為進行比較;完成的標準是找出掛起的原因,並確保 asyncpg 在此設定下能乾淨地中斷連線。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
gcp, postgresql, python
領域
cloud, databases
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。