title: Rails add_index algorithm: :concurrently still causes database lock up during migration
body: <p>In order to prevent database transaction errors during our migrations to the production site, we followed the advice outlined in <a href="https://github.com/LendingHome/zero_downtime_migrations" rel="noreferrer">https://github.com/LendingHome/zero_downtime_migrations</a> (specifically outlined by <a href="https://robots.thoughtbot.com/how-to-create-postgres-indexes-concurrently-in" rel="noreferrer">https://robots.thoughtbot.com/how-to-create-postgres-indexes-concurrently-in</a>), but during the creation of an index on a particularly large table, even the "concurrent" method of index creation locked the table and caused any ActiveRecord creates or updates on that table caused their respective transactions to fail with <code>PG::InFailedSqlTransaction</code> exceptions.</p>
  
  <p>Here is what the migration looked like we're running Rails 4.2 (with ActiveRecord 4.2.7.1):</p>
  
  <pre><code>class AddTypeIndexToModel &lt; ActiveRecord::Migration
    disable_ddl_transaction!
  
    def change
      add_index :model, :model_type_id, algorithm: :concurrently
    end
  end
  </code></pre>