【问题标题】:How to check if postgres is indexing concurrently?如何检查postgres是否同时索引?
【发布时间】:2020-01-22 05:44:51
【问题描述】:

我已经写了这个迁移到并发索引:

add_index :table_name, %i[field1 field2], algorithm: :concurrently

如何检查新记录插入和更新操作是否同时进行索引?

【问题讨论】:

    标签: ruby-on-rails postgresql indexing


    【解决方案1】:

    任何当前执行的语句都在pg_stat_activity.query 列中可见。所以你可以在那里验证它。更多的。这种类型的索引在元数据中可见,但在创建完成之前它会被标记为INVALID

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-01-09
      • 2017-10-22
      • 2013-03-21
      • 2017-07-03
      • 2017-08-02
      • 2016-03-21
      • 1970-01-01
      相关资源
      最近更新 更多