Adding index concurrently error not showing up on local environment
matsales28 opened this issue · 1 comments
matsales28 commented
The following error when creating an index currently at the PostgreSQL versions 14.0 to 14.3 is not being raised on the local environment.
StandardError: An error has occurred, all later migrations canceled:
⚠️ [online_migrations] Dangerous operation detected ⚠️
Adding an index concurrently can cause silent data corruption in PostgreSQL 14.0 to 14.3.
Upgrade PostgreSQL before adding new indexes, or wrap this step in a safety_assured { ... }
block to accept the risk.
Do you think that this approach is the better one? Not raising this error in the local environment might make us believe that our migration is safe to run on production (I'm reverting a PR that only raised this error on staging env). What do you think of changing this behaviour or maybe raising a warning(Utils.warn
)?
fatkodima commented
Thanks for the report. Released a new version with this change.