Commit db2687d
committed
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.com1 parent 695c597 commit db2687d
1 file changed
+3
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2549 | 2549 | | |
2550 | 2550 | | |
2551 | 2551 | | |
2552 | | - | |
2553 | 2552 | | |
2554 | 2553 | | |
2555 | 2554 | | |
| |||
2559 | 2558 | | |
2560 | 2559 | | |
2561 | 2560 | | |
2562 | | - | |
2563 | | - | |
2564 | | - | |
2565 | | - | |
2566 | | - | |
2567 | | - | |
2568 | | - | |
2569 | | - | |
2570 | | - | |
2571 | | - | |
2572 | | - | |
2573 | | - | |
2574 | | - | |
2575 | | - | |
2576 | | - | |
2577 | | - | |
2578 | | - | |
2579 | | - | |
| 2561 | + | |
| 2562 | + | |
| 2563 | + | |
2580 | 2564 | | |
2581 | 2565 | | |
2582 | 2566 | | |
| |||
0 commit comments