Reputation: 56
I have a written this migration to index concurrently:
add_index :table_name, %i[field1 field2], algorithm: :concurrently
How do I check if indexing is happening concurrently for new records insertion and update operation?
Upvotes: 0
Views: 489
Reputation: 45770
Any currently executed statements are visible in pg_stat_activity.query
column. So you can verify it there. More. This type of index is visible in metadata, but it is flagged as INVALID
until the creating is done.
Upvotes: 1