A session that does not have any live snapshots does not have to be waited for
Tom Lane <tgl@sss.pgh.pa.us>
A session that does not have any live snapshots does not have to be waited for when we are waiting for old snapshots to go away during a concurrent index build. In particular, this rule lets us avoid waiting for idle-in-transaction sessions. This logic could be improved further if we had some way to wake up when the session we are currently waiting for goes idle-in-transaction. However that would be a significantly more complex/invasive patch, so it'll have to wait for some other day. Simon Riggs, with some improvements by Tom.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/indexcmds.c | modified | +56 −11 |
| src/backend/storage/ipc/procarray.c | modified | +35 −18 |
| src/include/storage/lock.h | modified | +7 −1 |
| src/include/storage/procarray.h | modified | +3 −2 |