Commit 6897f0e
committed
Optimize memory access in GetRunningTransactionData()
e85662d made GetRunningTransactionData() calculate the oldest running
transaction id within the current database. This commit optimized this
calculation by performing a cheap transaction id comparison before fetching
the process database id, while the latter could cause extra cache misses.
Reported-by: Noah Misch
Discussion: https://postgr.es/m/20240630231816.bf.nmisch%40google.com1 parent 6c1af54 commit 6897f0e
1 file changed
+11
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2753 | 2753 | | |
2754 | 2754 | | |
2755 | 2755 | | |
2756 | | - | |
2757 | | - | |
2758 | 2756 | | |
2759 | 2757 | | |
2760 | 2758 | | |
| |||
2776 | 2774 | | |
2777 | 2775 | | |
2778 | 2776 | | |
2779 | | - | |
| 2777 | + | |
| 2778 | + | |
| 2779 | + | |
2780 | 2780 | | |
2781 | | - | |
2782 | | - | |
2783 | | - | |
| 2781 | + | |
| 2782 | + | |
| 2783 | + | |
| 2784 | + | |
| 2785 | + | |
| 2786 | + | |
| 2787 | + | |
| 2788 | + | |
2784 | 2789 | | |
2785 | 2790 | | |
2786 | 2791 | | |
| |||
0 commit comments