diff options
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 2f4b2b9a3a..1c469f44a1 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -55,7 +55,10 @@ module ActiveRecord def initialize(connection, logger, config = {}) super(connection, logger) @config = config - @async = config[:allow_concurrency] + + # Ignore async_exec and async_query with the postgres-pr client lib. + @async = config[:allow_concurrency] && @connection.respond_to(:async_exec) + configure_connection end |