forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc7654f6
committed
Fix representation of SORT_TYPE_STILL_IN_PROGRESS.
It turns out that the code did indeed rely on a zeroedTuplesortInstrumentation.sortMethod field to indicate"this worker never did anything", although it seems theissue only comes up during certain race-condition-y cases.Hence, rearrange the TuplesortMethod enum to restoreSORT_TYPE_STILL_IN_PROGRESS to having the value zero,and add some comments reinforcing that that isn't optional.Also future-proof a loop over the possible values of the enum.sizeof(bits32) happened to be the correct limit value,but only by purest coincidence.Per buildfarm and local investigation.Discussion:https://postgr.es/m/12222.1586223974@sss.pgh.pa.us1 parent4c04be9 commitc7654f6
2 files changed
+18
-12
lines changedLines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2762 | 2762 |
| |
2763 | 2763 |
| |
2764 | 2764 |
| |
2765 |
| - | |
| 2765 | + | |
2766 | 2766 |
| |
2767 |
| - | |
| 2767 | + | |
| 2768 | + | |
| 2769 | + | |
2768 | 2770 |
| |
2769 |
| - | |
2770 |
| - | |
| 2771 | + | |
2771 | 2772 |
| |
2772 |
| - | |
2773 | 2773 |
| |
2774 | 2774 |
| |
2775 | 2775 |
| |
|
Lines changed: 13 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
62 | 62 |
| |
63 | 63 |
| |
64 | 64 |
| |
65 |
| - | |
66 |
| - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
67 | 71 |
| |
68 | 72 |
| |
69 | 73 |
| |
70 |
| - | |
71 |
| - | |
72 |
| - | |
73 |
| - | |
74 |
| - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
75 | 79 |
| |
76 | 80 |
| |
| 81 | + | |
| 82 | + | |
77 | 83 |
| |
78 | 84 |
| |
79 | 85 |
| |
|
0 commit comments
Comments
(0)