Adding or dropping indexes 📒 in a live PostgreSQL database means locking the entire table, potentially causing application slowdowns or outages. Use CONCURRENTLY with CREATE INDEX or DROP INDEX to perform the operation in the background. #postgres

Reply to this note

Please Login to reply.

Discussion

If you manage your database via Flyway, don't forget to set "flyway.postgresql.transactional.lock" to "false". Otherwise, your job will get stuck!