Optimize PredicateLockTuple().
Thomas Munro <tmunro@postgresql.org>
Optimize PredicateLockTuple(). PredicateLockTuple() has a fast exit if tuple was written by the current transaction, as in that case it already has a lock. This check can be performed using TransactionIdIsCurrentTransactionId() instead of SubTransGetTopmostTransaction(), to avoid any chance of having to hit the disk. Author: Ashwin Agrawal, based on a suggestion from Andres Freund Reviewed-by: Thomas Munro Discussion: https://postgr.es/m/CALfoeiv0k3hkEb3Oqk%3DziWqtyk2Jys1UOK5hwRBNeANT_yX%2Bng%40mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/storage/lmgr/predicate.c | modified | +3 −19 |
Discussion
- Remove HeapTuple and Buffer dependency for predicate locking functions 25 messages · 2019-06-24 → 2020-01-28