Now that we've rearranged relation open to get a lock before touching
Tom Lane <tgl@sss.pgh.pa.us>
Now that we've rearranged relation open to get a lock before touching the rel, it's easy to get rid of the narrow race-condition window that used to exist in VACUUM and CLUSTER. Did some minor code-beautification work in the same area, too.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/heap/heapam.c | modified | +63 −25 |
| src/backend/commands/analyze.c | modified | +6 −10 |
| src/backend/commands/cluster.c | modified | +30 −19 |
| src/backend/commands/lockcmds.c | modified | +5 −2 |
| src/backend/commands/vacuum.c | modified | +24 −27 |
| src/backend/storage/lmgr/lmgr.c | modified | +18 −3 |
| src/include/access/heapam.h | modified | +3 −2 |
| src/include/storage/lmgr.h | modified | +2 −1 |