forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitfc02e67
committed
Fix race condition between relation extension and vacuum.
Ine6799d5 I removed vacuumlazy.c trickery around re-checkingwhether a page is actually empty after acquiring an extension lock onthe relation, because the page is not PageInit()ed anymore, andentries in the FSM ought not to lead to user-visible errors.As reported by various buildfarm animals that is not correct, giventhe way to code currently stands: If vacuum processes a page that'sjust been newly added by either RelationGetBufferForTuple() orRelationAddExtraBlocks(), it could add that page to the FSM and itcould be reused by other backends, before those two functions checkwhether the newly added page is actually new. That's a relativelynarrow race, but several buildfarm machines appear to be able to hitit.While it seems wrong that the FSM, given it's lack of durability andapproximative nature, can trigger errors like this, that seems betterfixed in a separate commit. Especially given that a good portion ofthe buildfarm is red, and this is just re-introducing logic thatexisted a few hours ago.Author: Andres FreundDiscussion:https://postgr.es/m/20190128222259.zhi7ovzgtkft6em6@alap3.anarazel.de1 parent36a1281 commitfc02e67
1 file changed
+31
-5
lines changedLines changed: 31 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
860 | 860 |
| |
861 | 861 |
| |
862 | 862 |
| |
| 863 | + | |
| 864 | + | |
863 | 865 |
| |
864 | 866 |
| |
865 | 867 |
| |
| |||
877 | 879 |
| |
878 | 880 |
| |
879 | 881 |
| |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
880 | 897 |
| |
881 |
| - | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
882 | 902 |
| |
883 | 903 |
| |
884 | 904 |
| |
885 | 905 |
| |
886 | 906 |
| |
| 907 | + | |
887 | 908 |
| |
888 | 909 |
| |
889 |
| - | |
| 910 | + | |
890 | 911 |
| |
891 |
| - | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
892 | 917 |
| |
893 |
| - | |
894 |
| - | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
895 | 921 |
| |
896 | 922 |
| |
897 | 923 |
| |
|
0 commit comments
Comments
(0)