Skip to content

Commit

Permalink
Fix for postgres library client 9.6
Browse files Browse the repository at this point in the history
When Postgres library (libpq) 9.6 is installed on the server, `pg_dump` adds an SQL command to SET `idle_in_transaction_session_timeout`, which is new to 9.6, so it fails when running against older versions of the Postgres database.

I've added the parameter to the blacklist.
  • Loading branch information
omergertel authored Mar 21, 2017
1 parent 08b804e commit 1b9411e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/apartment/adapters/postgresql_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ class PostgresqlSchemaFromSqlAdapter < PostgresqlSchemaAdapter
PSQL_DUMP_BLACKLISTED_STATEMENTS= [
/SET search_path/i, # overridden later
/SET lock_timeout/i # new in postgresql 9.3
/SET idle_in_transaction_session_timeout/i # new in postgresql 9.6
]

def import_database_schema
Expand Down

0 comments on commit 1b9411e

Please sign in to comment.