Re: Deadlock between concurrent index builds on different tables
Jeremy Finzel <finzelj@gmail.com>
From: Jeremy Finzel <finzelj@gmail.com>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: Postgres General <pgsql-general@postgresql.org>
Date: 2017-12-23T18:11:47Z
Lists: pgsql-general
> > >> Each index build needs to wait for all other transactions (Including the > ones used by the other index build) to finish. So I don't think a deadlock > here is unexpected. > > Cheers, > > Jeff > Does that mean I should never build more than one concurrent index at a time within the entire cluster? If so, that is not clear from the documentation. So if I start 2 index builds within a second of each other, you are saying that the first will not finish even though it started first because there is a long transaction from the second index build? I would expect much more deadlocks in this case, but building 5 indexes concurrently at a time of a total 15 indexes I only get one or two deadlocks. I would expect many more if I can’t even have 2 at once... Thanks, Jeremy
Commits
-
Fix deadlock hazard in CREATE INDEX CONCURRENTLY
- fb7b43903e91 9.6.7 landed
- 82f1c3b7d1e0 9.5.11 landed
- 6d2a9ae0ed17 10.2 landed
- 54eff5311d7c 11.0 landed
- 47a3a1317873 9.4.16 landed