You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Single asyncpg connections invoke an introspection command that can be quite costly on first run with jit enabled - which it is on modern Postgres versions. This is fine when asyncpg connects directly to postgres because it wraps introspection commands in a jit=false flag. However when run behind pgbouncer, the query multiplexing strips out session based commands that toggle state like this, so JIT remains on and the queries become slow.
We need to figure out a way to cache this data internally within the runtime so it's usable across sessions.
Single asyncpg connections invoke an introspection command that can be quite costly on first run with jit enabled - which it is on modern Postgres versions. This is fine when asyncpg connects directly to postgres because it wraps introspection commands in a jit=false flag. However when run behind pgbouncer, the query multiplexing strips out session based commands that toggle state like this, so JIT remains on and the queries become slow.
We need to figure out a way to cache this data internally within the runtime so it's usable across sessions.
MagicStack/asyncpg#530
The text was updated successfully, but these errors were encountered: