GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Avoid performing type introspection on known types by elprans · Pull Request #1243 · MagicStack/asyncpg

Conversation

@elprans

@elprans elprans commented Mar 15, 2025

Copy link
Copy Markdown
Member

Type codec setup functions will no longer attempt to introspect the type
if it's one of the known builtin types.

Fixes: #1206
Fixes: #1138
Fixes: #1242

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@elprans
elprans force-pushed the avoid-introspection-on-builtin-types branch from 5cf5fc4 to e3b24a6 Compare March 15, 2025 00:59
@elprans
Avoid performing type introspection on known types
9cd0867
Type codec setup functions will no longer attempt to introspect the type
if it's one of the known builtin types.

Fixes: #1206
Fixes: #1138
Fixes: #1242
@elprans
elprans force-pushed the avoid-introspection-on-builtin-types branch from e3b24a6 to 9cd0867 Compare March 15, 2025 01:10
@elprans
elprans merged commit 5c9986c into master Mar 15, 2025
@elprans
elprans deleted the avoid-introspection-on-builtin-types branch March 15, 2025 01:29
@antonmyronyuk

antonmyronyuk commented Mar 31, 2025

Copy link
Copy Markdown
Contributor

Hi @elprans! Is it possible to release a new version with removal of introspection query?

Having some issues with stucked transactions (TYPE_BY_OID) on PostgreSQL under heavy load. This update should fix such cases as well.

Thank you in advance!

sumersao and ayratsa reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@elprans

elprans commented Mar 31, 2025

Copy link
Copy Markdown
Member Author

I'll get around to cutting a release this week at some point.

antonmyronyuk, sumersao, and samaross reacted with thumbs up emoji ashleyheath, sumersao, samaross, dmkulazhenko, and ayratsa reacted with heart emoji
All reactions
  • 👍 3 reactions
  • ❤️ 5 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sumersao

sumersao commented Apr 4, 2025

Copy link
Copy Markdown

Thank you @elprans. We're also experiencing this, so glad to see it was resolved already! Looking forward to the release 🙏🏾

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@yyuliababenko

yyuliababenko commented Apr 27, 2025

Copy link
Copy Markdown

Hi @elprans, waiting for the new release as well!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@alex-tolstov

alex-tolstov commented May 26, 2025

Copy link
Copy Markdown

Hello @elprans ! Could you please promote a new release involving those bugfixes? We'd highly appreciate it!

dankvul, leemurus, dmkulazhenko, ayratsa, YuriiDovzhenko, and antonmyronyuk reacted with thumbs up emoji
All reactions
  • 👍 6 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dmkulazhenko

dmkulazhenko commented May 26, 2025

Copy link
Copy Markdown

Hi @elprans! looking forward to release 🚀

ayratsa and YuriiDovzhenko reacted with rocket emoji
All reactions
  • 🚀 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@brandfocus

brandfocus commented Jun 26, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

@elprans Is a new release still planned?

For anyone looking to patch this in the interim, update your pyproject.toml to the following:

asyncpg = {git = "https://github.com/MagicStack/asyncpg.git", rev = "5c9986c4ae4e52a650b6592681ae9ea81ed2d70a"}
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@candiduslynx

candiduslynx commented Oct 10, 2025

Copy link
Copy Markdown

@elprans any updates?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

elprans added a commit that referenced this pull request Nov 24, 2025
@elprans
asyncpg v0.31.0
71775a6
Enable Python 3.14 with experimental subinterpreter/freethreading
support.

Improvements
============

* Add Python 3.14 support, experimental subinterpreter/freethreading support (#1279)
  (by @elprans in 9e42642)

* Avoid performing type introspection on known types (#1243)
  (by @elprans in 5c9986c)

* Make `prepare()` not use named statements by default when cache is disabled (#1245)
  (by @elprans in 5b14653)

* Implement connection service file functionality (#1223)
  (by @AndrewJackson2020 in 1d63bb1)

Fixes
=====

* Fix multi port connection string issue (#1222)
  (by @AndrewJackson2020 in 01c0db7)

* Avoid leaking connections if _can_use_connection fails (#1269)
  (by @yuliy-openai in e94302d)

Other
=====

* Drop support for EOL Python 3.8 (#1281)
  (by @elprans in 6c2c490)
@elprans elprans mentioned this pull request Nov 24, 2025
asyncpg v0.31.0 #1291
Merged
@claude claude Bot mentioned this pull request Nov 25, 2025
Update dependency asyncpg to >=0.31.0,<0.32.0 mgh3326/auto_trader#80
Merged
1 task
bg-admin7 pushed a commit to bg-open-source/asyncpg that referenced this pull request Dec 10, 2025
Andrei K
Merge tag 'v0.31.0' into non-blocking-conns-v3
acc3154
asyncpg v0.31.0

Enable Python 3.14 with experimental subinterpreter/freethreading
support.

Improvements
============

* Add Python 3.14 support, experimental subinterpreter/freethreading support (MagicStack#1279)
  (by @elprans in 9e42642)

* Avoid performing type introspection on known types (MagicStack#1243)
  (by @elprans in 5c9986c)

* Make `prepare()` not use named statements by default when cache is disabled (MagicStack#1245)
  (by @elprans in 5b14653)

* Implement connection service file functionality (MagicStack#1223)
  (by @AndrewJackson2020 in 1d63bb1)

Fixes
=====

* Fix multi port connection string issue (MagicStack#1222)
  (by @AndrewJackson2020 in 01c0db7)

* Avoid leaking connections if _can_use_connection fails (MagicStack#1269)
  (by @yuliy-openai in e94302d)

Other
=====

* Drop support for EOL Python 3.8 (MagicStack#1281)
  (by @elprans in 6c2c490)

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEES/rQWfT9RAppNY3YXEaHeAYth78FAmkk6UMACgkQXEaHeAYt
# h7+LBw//fX/3/nHrEUctYR7A/WQqg2oj3nvk10b3OQjzHUGyHq0DhkSC7/H9P0FI
# vl0j2n+BfKcKxOw4OgbxDq5fff/a4ScsejVwsKqQEEDH9tiXAL2cIId1yvNWC9hJ
# 8WxmkJzbFHdrl1D3/pxUv15UoaMSZD1DtPXaYEupRyEKXVOfQ/ush5GU5M3vA19R
# aWrAFtbMd3MMfaBYEO1TQtZNCV3n3Dv8fmIwv8qPbqJt2lsk4HOE8F3Be/RGiaPZ
# dI9eGnZ+qmlYC/mZYKNywaBlm4v/hHhuGwSh8WdkY6h4lFkBl8HipuPpoNeWO/fd
# k5wl1Q2HA8i2qEokz7EzYPRYjOPZwXphxscRXJQbdlCNyfJ+lPTu3uAQ08RTnoGU
# +JROauwgtQknnZEGtRWNerRcbZE1D+SgkLhGkEk6+tcIJ0G2XoCsn7A/u9LMmZuN
# 7lcFnLEdDnUSaLx7SZgcbOKP1Acg1W2Vk375JxXrymGqq5FPss8cdg+KOFMNuljT
# v/RtKvAP3yXpR448uPQ6M4BNVJ5my3UwdPrHwpGNkSxaqKBGGtryBG4LLw43yPCg
# FPFO9P//z+59RsmAvilaOhT/pLhqRvOJTkaUt5bt6Fw+5SzCfNfciNkl4rBC+9EQ
# LC/NQmO9cFYlpnO7s3uF0M+JTLV1u0CJp5G5USiQiEU+tVlaH6E=
# =bEvL
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 25 Nov 2025 12:24:51 AM CET
# gpg:                using RSA key 4BFAD059F4FD440A69358DD85C468778062D87BF
# gpg: Can't check signature: No public key
bg-admin7 pushed a commit to bg-open-source/asyncpg that referenced this pull request Dec 10, 2025
Andrei K
Merge tag 'v0.31.0' into non-blocking-conns-v4
64ddc43
asyncpg v0.31.0

Enable Python 3.14 with experimental subinterpreter/freethreading
support.

Improvements
============

* Add Python 3.14 support, experimental subinterpreter/freethreading support (MagicStack#1279)
  (by @elprans in 9e42642)

* Avoid performing type introspection on known types (MagicStack#1243)
  (by @elprans in 5c9986c)

* Make `prepare()` not use named statements by default when cache is disabled (MagicStack#1245)
  (by @elprans in 5b14653)

* Implement connection service file functionality (MagicStack#1223)
  (by @AndrewJackson2020 in 1d63bb1)

Fixes
=====

* Fix multi port connection string issue (MagicStack#1222)
  (by @AndrewJackson2020 in 01c0db7)

* Avoid leaking connections if _can_use_connection fails (MagicStack#1269)
  (by @yuliy-openai in e94302d)

Other
=====

* Drop support for EOL Python 3.8 (MagicStack#1281)
  (by @elprans in 6c2c490)

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEES/rQWfT9RAppNY3YXEaHeAYth78FAmkk6UMACgkQXEaHeAYt
# h7+LBw//fX/3/nHrEUctYR7A/WQqg2oj3nvk10b3OQjzHUGyHq0DhkSC7/H9P0FI
# vl0j2n+BfKcKxOw4OgbxDq5fff/a4ScsejVwsKqQEEDH9tiXAL2cIId1yvNWC9hJ
# 8WxmkJzbFHdrl1D3/pxUv15UoaMSZD1DtPXaYEupRyEKXVOfQ/ush5GU5M3vA19R
# aWrAFtbMd3MMfaBYEO1TQtZNCV3n3Dv8fmIwv8qPbqJt2lsk4HOE8F3Be/RGiaPZ
# dI9eGnZ+qmlYC/mZYKNywaBlm4v/hHhuGwSh8WdkY6h4lFkBl8HipuPpoNeWO/fd
# k5wl1Q2HA8i2qEokz7EzYPRYjOPZwXphxscRXJQbdlCNyfJ+lPTu3uAQ08RTnoGU
# +JROauwgtQknnZEGtRWNerRcbZE1D+SgkLhGkEk6+tcIJ0G2XoCsn7A/u9LMmZuN
# 7lcFnLEdDnUSaLx7SZgcbOKP1Acg1W2Vk375JxXrymGqq5FPss8cdg+KOFMNuljT
# v/RtKvAP3yXpR448uPQ6M4BNVJ5my3UwdPrHwpGNkSxaqKBGGtryBG4LLw43yPCg
# FPFO9P//z+59RsmAvilaOhT/pLhqRvOJTkaUt5bt6Fw+5SzCfNfciNkl4rBC+9EQ
# LC/NQmO9cFYlpnO7s3uF0M+JTLV1u0CJp5G5USiQiEU+tVlaH6E=
# =bEvL
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 25 Nov 2025 12:24:51 AM CET
# gpg:                using RSA key 4BFAD059F4FD440A69358DD85C468778062D87BF
# gpg: Can't check signature: No public key
@quentinverlhac quentinverlhac mentioned this pull request Jul 14, 2026
Regression in v0.31.0: with statement_cache_size=0, type introspection reuses the unnamed statement name "" and clobbers a user statement on the server-side cursor path #1335
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Avoid Repeated Type Introspection Queries in asyncpg with NullPool and PgBouncer (Session Mode) Why is asyncpg doing type introspection on json types? Introspection TYPE_BY_OID running for long time

Uh oh!

There was an error while loading. Please reload this page.

8 participants

@elprans @antonmyronyuk @sumersao @yyuliababenko @alex-tolstov @dmkulazhenko @brandfocus @candiduslynx
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.