Ticket #1215 (closed enhancement: wontfix)

Opened 3 years ago

Last modified 3 years ago

Create 'CONCURRENTLY' index

Reported by: stephane.raimbault@… Owned by: andrew
Priority: major Milestone:
Component: migrations Version: unknown
Keywords: Cc:


It's very important on production databases to build index without taking any locks.

PostgreSQL is able to do that with CREATE INDEX CONCURRENTLY but it's certainly not supported by all databases, so at least, I'm looking for a way to create this index with South. This PostgreSQL command can only be used outside a transaction and I don't know if it's to possible to run a migration without a transaction.

When this option is used, PostgreSQL will build the index without
taking any locks that prevent concurrent inserts, updates, or deletes
on the table; whereas a standard index build locks out writes (but
not reads) on the table until it's done. There are several caveats to
be aware of when using this option

Change History

comment:1 Changed 3 years ago by andrew

  • Status changed from new to closed
  • Resolution set to wontfix

There are no plans to implement CREATE INDEX CONCURRENTLY in South - it's a PostgreSQL-specific feature, and migrations are always run inside transactions.

If you want to use it, you're free to use a snippet like the following:

Note: See TracTickets for help on using tickets.