- Notifications
You must be signed in to change notification settings - Fork5
Commit6bad580
committed
Avoid SnapshotResetXmin() during AtEOXact_Snapshot()
For normal commits and aborts we already reset PgXact->xmin,so we can simply avoid running SnapshotResetXmin() twice.During performance tests by Alexander Korotkov, diagnosisby Andres Freund showed PgXact array as a bottleneck. Aftermanual analysis by me of the code paths that touch thosememory locations, I was able to identify extraneous codein the main transaction commit path.Avoiding touching highly contented shmem improves concurrentperformance slightly on all workloads, confirmed by testsrun by Ashutosh Sharma and Alexander Korotkov.Simon RiggsDiscussion: CANP8+jJdXE9b+b9F8CQT-LuxxO0PBCB-SZFfMVAdp+akqo4zfg@mail.gmail.com1 parentfd01983 commit6bad580
3 files changed
+16
-6
lines changedLines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2137 | 2137 |
| |
2138 | 2138 |
| |
2139 | 2139 |
| |
2140 |
| - | |
| 2140 | + | |
2141 | 2141 |
| |
2142 | 2142 |
| |
2143 | 2143 |
| |
| |||
2409 | 2409 |
| |
2410 | 2410 |
| |
2411 | 2411 |
| |
2412 |
| - | |
| 2412 | + | |
2413 | 2413 |
| |
2414 | 2414 |
| |
2415 | 2415 |
| |
| |||
2640 | 2640 |
| |
2641 | 2641 |
| |
2642 | 2642 |
| |
2643 |
| - | |
| 2643 | + | |
2644 | 2644 |
| |
2645 | 2645 |
| |
2646 | 2646 |
| |
|
Lines changed: 12 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1051 | 1051 |
| |
1052 | 1052 |
| |
1053 | 1053 |
| |
1054 |
| - | |
| 1054 | + | |
1055 | 1055 |
| |
1056 | 1056 |
| |
1057 | 1057 |
| |
| |||
1136 | 1136 |
| |
1137 | 1137 |
| |
1138 | 1138 |
| |
1139 |
| - | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
1140 | 1150 |
| |
1141 | 1151 |
| |
1142 | 1152 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
85 | 85 |
| |
86 | 86 |
| |
87 | 87 |
| |
88 |
| - | |
| 88 | + | |
89 | 89 |
| |
90 | 90 |
| |
91 | 91 |
| |
|
0 commit comments
Comments
(0)