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
{{ message }}
Repository navigation
DeprecationWarning: Calling client.query() when the client is already executing a query is deprecated and will be removed in [email protected] #12238
DeprecationWarning: Calling client.query() when the client is already executing a query is deprecated and will be removed in [email protected]. Use async/await or an external async flow control mechanism instead.
seeing this when using
relationLoadStrategy: 'query'
since pg update
The Solution
Seems these can no longer be handled with promise.all
Considered Alternatives
not using relationLoadStrategy: 'query',
Additional Context
No response
Relevant Database Driver(s)
aurora-mysql
aurora-postgres
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
spanner
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
No
Reacted by Sotir Danailov, Ihor Dotsenko, Max Glaser, Russ Balabanov, Jan Lupčík, Vo Duc Huy, Manuel Spigolon and delps-presidio
Here's a patch changing all occurences of concurrent queries in our codebase, to run sequentially on postgres. Unfortunately, I don't have the time to turn this into a proper PR.
This is the remaining half of the pg@9 deprecation warning that was partially addressed by #12105 (merged). That fix serialized the loadTables(), clearDatabase(), and dropEnumTypes() paths, but the relationLoadStrategy: 'query' relation loading code path still fires concurrent client.query() calls against the same client and triggers the same deprecation warning.
Activity
max-brigade commentedon Mar 19, 2026
It also seems to happen when calling .save on a ManyToMany relation
aklemen commentedon Mar 19, 2026
This was already addressed in #12105 (duplicate issue #12055).
max-brigade commentedon Mar 19, 2026
Isn't #12105 only addressing migrations and not relationLoadStrategy: 'query', and saving of ManyToMany relations?
max-brigade commentedon Apr 7, 2026
typeorm+0.3.28.patch
Here's a patch changing all occurences of concurrent queries in our codebase, to run sequentially on postgres. Unfortunately, I don't have the time to turn this into a proper PR.
pkuczynski commentedon Apr 15, 2026
This is the remaining half of the
pg@9deprecation warning that was partially addressed by #12105 (merged). That fix serialized theloadTables(),clearDatabase(), anddropEnumTypes()paths, but therelationLoadStrategy: 'query'relation loading code path still fires concurrentclient.query()calls against the same client and triggers the same deprecation warning.fix(postgres,cockroachdb): include cockroachdb and move test to funct…
test(persistence): fix typeorm#12238 deprecation suite for postgres, …