Re: Locking considerations of REINDEX

2018-07-04 Thread Peter Geoghegan
On Wed, Jul 4, 2018 at 5:08 AM, Pavan Deolasee wrote: > But AFAICS get_relation_info() tries to lock every index and since REINDEX > will be holding a AEL on the index being reindexed, get_relation_info() > blocks. Since get_relation_info() gets into every read path, wouldn't a > concurrent REINDE

Locking considerations of REINDEX

2018-07-04 Thread Pavan Deolasee
The documentation [1] claims that REINDEX does not block readers on the table. "REINDEX is similar to a drop and recreate of the index in that the index contents are rebuilt from scratch. However, the locking considerations are rather different. REINDEX locks out writes but not reads of the index'