Skip to content

Prevent prepare_async_index on partitioned table

Max Orefice requested to merge morefice/fix-async-index-partitioned-table into master

Ref: #495696 (closed)

What does this MR do and why?

This MR prevents prepare_async_index to be called on a partitioned table.

[2] pry(main)> ApplicationRecord.connection.execute("CREATE INDEX CONCURRENTLY \"test_index\" ON \"p_ci_builds\" (\"project_id\")")
   (0.8ms)  CREATE INDEX CONCURRENTLY "test_index" ON "p_ci_builds" ("project_id") /
ActiveRecord::StatementInvalid: PG::FeatureNotSupported: ERROR:  cannot create index on partitioned table "p_ci_builds" concurrently
Caused by PG::FeatureNotSupported: ERROR:  cannot create index on partitioned table "p_ci_builds" concurrently
Edited by Max Orefice

Merge request reports

Loading