- Notifications
You must be signed in to change notification settings - Fork5.3k
Commit6b01cac
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 parentfe8091c commit6b01cac
1 file changed
+36
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2788 | 2788 | | |
2789 | 2789 | | |
2790 | 2790 | | |
| 2791 | + | |
| 2792 | + | |
| 2793 | + | |
2791 | 2794 | | |
2792 | 2795 | | |
2793 | 2796 | | |
| |||
2796 | 2799 | | |
2797 | 2800 | | |
2798 | 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 | + | |
| 2833 | + | |
2799 | 2834 | | |
2800 | 2835 | | |
2801 | 2836 | | |
| |||
2849 | 2884 | | |
2850 | 2885 | | |
2851 | 2886 | | |
2852 | | - | |
| 2887 | + | |
2853 | 2888 | | |
2854 | | - | |
2855 | | - | |
2856 | | - | |
2857 | | - | |
2858 | | - | |
2859 | | - | |
2860 | | - | |
2861 | | - | |
2862 | 2889 | | |
2863 | 2890 | | |
2864 | 2891 | | |
| |||
0 commit comments
Comments
(0)