From 821f2d58a76da208b1f6851e436a3f1f9a00dbaa Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 6 Mar 2007 09:27:54 +0000 Subject: PostgreSQL: don't use async_exec and async_query with postgres-pr. Closes #7727. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6346 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../lib/active_record/connection_adapters/postgresql_adapter.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/connection_adapters') 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 -- cgit v1.2.3