-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
postgresqluse casenot really a feature or a bug; can be support for new DB features or user use cases not anticipatednot really a feature or a bug; can be support for new DB features or user use cases not anticipated
Description
Describe the use case
The issue: #6467 describes the problem with unique naming prepared statements on asyncpg side when using pg bouncer.
To avoid this the asyncpg added an optional name parameter to provide a custom name for prepared statements MagicStack/asyncpg#846.
I suggest populating an optional custom function to generate unique names for prepared statements in Asyncpg Adapter
Databases / Backends / Drivers targeted
Postgresql, asyncpg
Example Use
from uuid import uuid4
engine = create_async_engine(...,
connect_args={
'prepared_statement_name_func': lambda: f'__asyncpg_{uuid4()}__',
},
)Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
postgresqluse casenot really a feature or a bug; can be support for new DB features or user use cases not anticipatednot really a feature or a bug; can be support for new DB features or user use cases not anticipated