赞
踩
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的时间越长
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。