- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitd729f1e
committed
Move I/O before the index_update_stats() buffer lock region.
Commita07e03f enlarged the work donehere under the pg_class heap buffer lock. Two preexisting actions arebest done before holding that lock. Both RelationGetNumberOfBlocks()and visibilitymap_count() do I/O, and the latter might exclusive-lock avisibility map buffer. Moving these reduces contention and risk ofundetected LWLock deadlock. Back-patch to v12, like that commit.Discussion:https://postgr.es/m/20241031200139.b4@rfd.leadboat.com1 parent4b0f7d6 commitd729f1e
1 file changed
+36
-9
lines changedLines changed: 36 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2787 | 2787 |
| |
2788 | 2788 |
| |
2789 | 2789 |
| |
| 2790 | + | |
| 2791 | + | |
| 2792 | + | |
2790 | 2793 |
| |
2791 | 2794 |
| |
2792 | 2795 |
| |
| |||
2795 | 2798 |
| |
2796 | 2799 |
| |
2797 | 2800 |
| |
| 2801 | + | |
| 2802 | + | |
| 2803 | + | |
| 2804 | + | |
| 2805 | + | |
| 2806 | + | |
| 2807 | + | |
| 2808 | + | |
| 2809 | + | |
| 2810 | + | |
| 2811 | + | |
| 2812 | + | |
| 2813 | + | |
| 2814 | + | |
| 2815 | + | |
| 2816 | + | |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
| 2820 | + | |
| 2821 | + | |
| 2822 | + | |
| 2823 | + | |
| 2824 | + | |
| 2825 | + | |
| 2826 | + | |
| 2827 | + | |
| 2828 | + | |
| 2829 | + | |
| 2830 | + | |
| 2831 | + | |
| 2832 | + | |
2798 | 2833 |
| |
2799 | 2834 |
| |
2800 | 2835 |
| |
| |||
2848 | 2883 |
| |
2849 | 2884 |
| |
2850 | 2885 |
| |
2851 |
| - | |
| 2886 | + | |
2852 | 2887 |
| |
2853 |
| - | |
2854 |
| - | |
2855 |
| - | |
2856 |
| - | |
2857 |
| - | |
2858 |
| - | |
2859 |
| - | |
2860 |
| - | |
2861 | 2888 |
| |
2862 | 2889 |
| |
2863 | 2890 |
| |
|
0 commit comments
Comments
(0)