Re: Deadlock between concurrent index builds on different tables
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Jeremy Finzel <finzelj@gmail.com>
Cc: Jeff Janes <jeff.janes@gmail.com>, Postgres General <pgsql-general@postgresql.org>
Date: 2017-12-26T16:28:34Z
Lists: pgsql-general
Jeremy Finzel wrote: > > > > > >> 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. > 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. No, there is no such expectation. Jeff analyzed your scenario, discovered a bug and sent a patch to fix it -- care to test it and report back? You can get it from here: https://www.postgresql.org/message-id/CAMkU=1ztk3TpQdcUNbxq93pc80FrXUjpDWLGMeVBDx71GHNwZQ@mail.gmail.com -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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