forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit04e9678
committed
Code review for nodeGatherMerge.c.
Comment the fields of GatherMergeState, and organize them a bit moresensibly. Comment GMReaderTupleBuffer more usefully too. Improveassorted other comments that were obsolete or just not very good English.Get rid of the use of a GMReaderTupleBuffer for the leader process;that was confusing, since only the "done" field was used, and thatin a way redundant with need_to_scan_locally.In gather_merge_init, avoid calling load_tuple_array foralready-known-exhausted workers. I'm not sure if there's a live bug there,but the case is unlikely to be well tested due to timing considerations.Remove some useless code, such as duplicating the tts_isempty test done byTupIsNull.Remove useless initialization of ps.qual, replacing that with an assertionthat we have no qual to check. (If we did, the code would fail to checkit.)Avoid applying heap_copytuple to a null tuple. While that fails to crash,it's confusing and it makes the code less legible not more so IMO.Propagate a couple of these changes into nodeGather.c, as well.Back-patch to v10, partly because of the possibility that thegather_merge_init change is fixing a live bug, but mostly to keepthe branches in sync to ease future bug fixes.1 parent41b0dd9 commit04e9678
File tree
3 files changed
+138
-114
lines changed- src
- backend/executor
- include/nodes
3 files changed
+138
-114
lines changedLines changed: 12 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
71 | 71 |
| |
72 | 72 |
| |
73 | 73 |
| |
| 74 | + | |
| 75 | + | |
74 | 76 |
| |
75 | 77 |
| |
76 | 78 |
| |
| |||
82 | 84 |
| |
83 | 85 |
| |
84 | 86 |
| |
85 |
| - | |
| 87 | + | |
| 88 | + | |
86 | 89 |
| |
87 |
| - | |
88 |
| - | |
| 90 | + | |
89 | 91 |
| |
90 | 92 |
| |
91 | 93 |
| |
| |||
169 | 171 |
| |
170 | 172 |
| |
171 | 173 |
| |
| 174 | + | |
172 | 175 |
| |
| 176 | + | |
| 177 | + | |
173 | 178 |
| |
174 | 179 |
| |
175 | 180 |
| |
176 | 181 |
| |
177 |
| - | |
178 |
| - | |
179 |
| - | |
180 |
| - | |
| 182 | + | |
| 183 | + | |
181 | 184 |
| |
182 | 185 |
| |
183 | 186 |
| |
| |||
316 | 319 |
| |
317 | 320 |
| |
318 | 321 |
| |
319 |
| - | |
320 |
| - | |
| 322 | + | |
| 323 | + | |
321 | 324 |
| |
322 | 325 |
| |
323 | 326 |
| |
|
0 commit comments
Comments
(0)