Remove dependency on HeapTuple from predicate locking functions.
Thomas Munro <tmunro@postgresql.org>
Remove dependency on HeapTuple from predicate locking functions. The following changes make the predicate locking functions more generic and suitable for use by future access methods: - PredicateLockTuple() is renamed to PredicateLockTID(). It takes ItemPointer and inserting transaction ID instead of HeapTuple. - CheckForSerializableConflictIn() takes blocknum instead of buffer. - CheckForSerializableConflictOut() no longer takes HeapTuple or buffer. Author: Ashwin Agrawal Reviewed-by: Andres Freund, Kuntal Ghosh, Thomas Munro Discussion: https://postgr.es/m/CALfoeiv0k3hkEb3Oqk%3DziWqtyk2Jys1UOK5hwRBNeANT_yX%2Bng%40mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/gin/ginbtree.c | modified | +1 −1 |
| src/backend/access/gin/ginfast.c | modified | +1 −1 |
| src/backend/access/gin/gininsert.c | modified | +4 −2 |
| src/backend/access/gist/gist.c | modified | +1 −1 |
| src/backend/access/hash/hashinsert.c | modified | +1 −1 |
| src/backend/access/heap/heapam.c | modified | +109 −16 |
| src/backend/access/heap/heapam_handler.c | modified | +6 −5 |
| src/backend/access/index/indexam.c | modified | +2 −2 |
| src/backend/access/nbtree/nbtinsert.c | modified | +2 −2 |
| src/backend/storage/lmgr/predicate.c | modified | +42 −95 |
| src/include/access/heapam.h | modified | +2 −0 |
| src/include/storage/predicate.h | modified | +5 −4 |
Discussion
- Remove HeapTuple and Buffer dependency for predicate locking functions 25 messages · 2019-06-24 → 2020-01-28