forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit86c30ce
committed
Refactor GetLockStatusData() to skip backends/groups without fast-path locks.
Previously, GetLockStatusData() checked all slots for every backendto gather fast-path lock data, which could be inefficient. This commitrefactors it by skipping backends with PID=0 (since they don't holdfast-path locks) and skipping groups with no registered fast-path locks,improving efficiency.This refactoring is particularly beneficial, for example whenmax_connections and max_locks_per_transaction are set high,as it reduces unnecessary checks across numerous slots.Author: Fujii MasaoReviewed-by: Bertrand DrouvotDiscussion:https://postgr.es/m/a0a00c44-31e9-4c67-9846-fb9636213ac9@oss.nttdata.com1 parent45188c2 commit86c30ce
1 file changed
+39
-28
lines changedLines changed: 39 additions & 28 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3731 | 3731 |
| |
3732 | 3732 |
| |
3733 | 3733 |
| |
3734 |
| - | |
| 3734 | + | |
| 3735 | + | |
| 3736 | + | |
| 3737 | + | |
3735 | 3738 |
| |
3736 | 3739 |
| |
3737 | 3740 |
| |
3738 |
| - | |
| 3741 | + | |
3739 | 3742 |
| |
3740 |
| - | |
3741 |
| - | |
3742 |
| - | |
3743 |
| - | |
3744 |
| - | |
| 3743 | + | |
| 3744 | + | |
3745 | 3745 |
| |
3746 | 3746 |
| |
3747 |
| - | |
| 3747 | + | |
3748 | 3748 |
| |
3749 |
| - | |
3750 |
| - | |
3751 |
| - | |
3752 |
| - | |
| 3749 | + | |
| 3750 | + | |
| 3751 | + | |
3753 | 3752 |
| |
3754 |
| - | |
3755 |
| - | |
3756 |
| - | |
3757 |
| - | |
3758 |
| - | |
3759 |
| - | |
3760 |
| - | |
3761 |
| - | |
3762 |
| - | |
3763 |
| - | |
| 3753 | + | |
| 3754 | + | |
| 3755 | + | |
3764 | 3756 |
| |
3765 |
| - | |
3766 |
| - | |
3767 |
| - | |
3768 |
| - | |
3769 |
| - | |
| 3757 | + | |
| 3758 | + | |
| 3759 | + | |
| 3760 | + | |
| 3761 | + | |
| 3762 | + | |
3770 | 3763 |
| |
3771 |
| - | |
| 3764 | + | |
| 3765 | + | |
| 3766 | + | |
| 3767 | + | |
| 3768 | + | |
| 3769 | + | |
| 3770 | + | |
| 3771 | + | |
| 3772 | + | |
| 3773 | + | |
| 3774 | + | |
| 3775 | + | |
| 3776 | + | |
| 3777 | + | |
| 3778 | + | |
| 3779 | + | |
| 3780 | + | |
| 3781 | + | |
| 3782 | + | |
3772 | 3783 |
| |
3773 | 3784 |
| |
3774 | 3785 |
| |
|
0 commit comments
Comments
(0)