mattiaslinnap / django-partial-index

PostgreSQL and SQLite partial index support for Django
BSD 3-Clause "New" or "Revised" License
116 stars 12 forks source link

Add option to run migration `CONCURRENTLY` for postgres #9

Open tbicr opened 6 years ago

tbicr commented 6 years ago

For huge table when you create/drop index on live table for postgres, index creation lock table and for live you can just lock all enable connections and go to downtime when index will be created. So for this cases good case to use CONCURRENTLY.

Ouradze commented 6 years ago

Also, when running a transaction concurrently, we may need to change the migration so that the create is run outside a transaction.