Re: [DOC] Document concurrent index builds waiting on each other
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: James Coleman <jtc331@gmail.com>
Cc: Bruce Momjian <bruce@momjian.us>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2019-09-29T15:27:09Z
Lists: pgsql-hackers
On 2019-Sep-28, James Coleman wrote: > I believe caveats like this are worth calling out rather than > expecting users to have to understand the implementation details an > work out the implications on their own. I agree. > I read Alvaro as referring to the fact that the docs already call out > the following: > > > Regular index builds permit other regular index builds on the same > > table to occur simultaneously, but only one concurrent index build > > can occur on a table at a time. Yeah, that's what I was understanding. BTW I think there's an approach that could alleviate part of this problem, at least some of the time: whenever CIC runs for an index that's not on expression and not partial, we could set the PROC_IN_VACUUM flag. That would cause it to get ignored by other processes for snapshot purposes (including CIC itself), as well as by vacuum. I need to take some time to research the safety of this, but intuitively it seems safe. Even further, I think we could also do it for regular CREATE INDEX (under the same conditions) provided that it's not run in a transaction block. But that requires even more research/proof. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Call out vacuum considerations in create index docs
- c285a244f6d3 13.2 landed
- 93c39f987e9c 14.0 landed
- 259b21233032 12.6 landed
-
Document concurrent indexes waiting on each other
- ed9c9b033546 11.11 landed
- d3bd36a63d69 10.16 landed
- b3d33bf598dd 9.6.21 landed
- b2603f16ad75 12.6 landed
- 968a537b432e 9.5.25 landed
- 58ebe967f8a1 14.0 landed
- 3fe0e7c3fa27 13.2 landed
-
snapshot scalability: Don't compute global horizons while building snapshots.
- dc7420c2c927 14.0 cited
-
Remove PROC_IN_ANALYZE and derived flags
- cea3d5589865 14.0 landed
-
Improve performance of get_actual_variable_range with recently-dead tuples.
- 3ca930fc39cc 11.0 cited