Skip to content

Conversation

@elprans
Copy link
Member

We allow disabling the statement cache to circumvent a proxy's inability to
cope with them, however there are still some holes where the use of a named
statement is attempted: prepare() with the default arguments, and
copy_in(). Fix both so that the use of a named statement is dependent
upon whether the prepared statement cache is enabled.

Fixes: #1219
Closes: #1218

…sabled We allow disabling the statement cache to circumvent a proxy's inability to cope with them, however there are still some holes where the use of a named statement is attempted: `prepare()` with the default arguments, and `copy_in()`. Fix both so that the use of a named statement is dependent upon whether the prepared statement cache is enabled. Fixes: #1219Closes: #1218
@elpranselprans merged commit 5b14653 into masterMar 19, 2025
41 checks passed
@elpranselprans deleted the named-ps branch March 19, 2025 20:24
elprans added a commit that referenced this pull request Nov 24, 2025
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)
@elpranselprans mentioned this pull request Nov 24, 2025
bg-admin7 pushed a commit to bg-open-source/asyncpg that referenced this pull request Dec 10, 2025
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
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
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

copy_records_to_table uses named prepared statement even when statement_cache_size is 0

2 participants

@elprans