forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7921927
committed
Reverse the search order in afterTriggerAddEvent().
When scanning existing AfterTriggerSharedData records in searchof a match to the event being queued, we were examining therecords from oldest to newest. But it makes more sense to dothe opposite. The newest record is likely to be from the currentquery, while the oldest is likely to be from some previous commandin the same transaction, which will likely have different details.There aren't expected to be very many active AfterTriggerSharedDatarecords at once, so that this change is unlikely to make anyspectacular difference. Still, having added a nontrivially-expensivebms_equal call to this loop yesterday, I feel a need to shave cycleswhere possible.Discussion:https://postgr.es/m/4166712.1737583961@sss.pgh.pa.us1 parentb663b94 commit7921927
1 file changed
+7
-5
lines changedLines changed: 7 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4104 | 4104 |
| |
4105 | 4105 |
| |
4106 | 4106 |
| |
4107 |
| - | |
| 4107 | + | |
| 4108 | + | |
4108 | 4109 |
| |
4109 |
| - | |
4110 |
| - | |
4111 |
| - | |
| 4110 | + | |
| 4111 | + | |
| 4112 | + | |
4112 | 4113 |
| |
4113 | 4114 |
| |
4114 | 4115 |
| |
| |||
4120 | 4121 |
| |
4121 | 4122 |
| |
4122 | 4123 |
| |
4123 |
| - | |
| 4124 | + | |
4124 | 4125 |
| |
| 4126 | + | |
4125 | 4127 |
| |
4126 | 4128 |
| |
4127 | 4129 |
| |
|
0 commit comments
Comments
(0)