当前位置:   article > 正文

PostgreSQL DBA(37) - PG 12 REINDEX CONCURRENTLY

reindex concurrently

PG 12的新特性REINDEX
CONCURRENTLY,详细描述如下:

This adds the CONCURRENTLY option to the REINDEX command. A REINDEX
CONCURRENTLY on a specific index creates a new index (like CREATE
INDEX CONCURRENTLY), then renames the old index away and the new index
in place and adjusts the dependencies, and then drops the old
index (like DROP INDEX CONCURRENTLY). The REINDEX command also has
the capability to run its other variants (TABLE, DATABASE) with the
CONCURRENTLY option (but not SYSTEM).
The reindexdb command gets the —concurrently option.
Author: Michael Paquier, Andreas Karlsson, Peter Eisentraut
Reviewed-by: Andres Freund, Fujii Masao, Jim Nasby, Sergei Kornilov

PG 12引入REINDEX
CONCURRENTLY,为了解决在REINDEX期间不能执行查询操作的问题,REINDEX CONCURRENTLY使用了相对于pg_repack(前身是pg_reorg)成本更低的方法来实现在索引rebuild期间数据表的可读写查询,但rebuild的时间越长

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小惠珠哦/article/detail/741137
推荐阅读
相关标签
  

闽ICP备14008679号