Adjust scan plan nodes to avoid getting an extra AccessShareLock on a
Tom Lane <tgl@sss.pgh.pa.us>
Adjust scan plan nodes to avoid getting an extra AccessShareLock on a relation if it's already been locked by execMain.c as either a result relation or a FOR UPDATE/SHARE relation. This avoids an extra trip to the shared lock manager state. Per my suggestion yesterday.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/executor/execMain.c | modified | +7 −14 |
| src/backend/executor/execUtils.c | modified | +90 −2 |
| src/backend/executor/nodeBitmapHeapscan.c | modified | +7 −19 |
| src/backend/executor/nodeBitmapIndexscan.c | modified | +3 −3 |
| src/backend/executor/nodeIndexscan.c | modified | +5 −16 |
| src/backend/executor/nodeSeqscan.c | modified | +5 −19 |
| src/backend/executor/nodeTidscan.c | modified | +4 −17 |
| src/include/executor/executor.h | modified | +4 −1 |
| src/include/nodes/execnodes.h | modified | +10 −1 |