forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitcb8e015
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 parentd6a149f commitcb8e015
File tree
3 files changed
+136
-112
lines changed- src
- backend/executor
- include/nodes
3 files changed
+136
-112
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 |
| |
| |||
81 | 83 |
| |
82 | 84 |
| |
83 | 85 |
| |
84 |
| - | |
| 86 | + | |
| 87 | + | |
85 | 88 |
| |
86 |
| - | |
87 |
| - | |
| 89 | + | |
88 | 90 |
| |
89 | 91 |
| |
90 | 92 |
| |
| |||
167 | 169 |
| |
168 | 170 |
| |
169 | 171 |
| |
| 172 | + | |
170 | 173 |
| |
| 174 | + | |
| 175 | + | |
171 | 176 |
| |
172 | 177 |
| |
173 | 178 |
| |
174 | 179 |
| |
175 |
| - | |
176 |
| - | |
177 |
| - | |
178 |
| - | |
| 180 | + | |
| 181 | + | |
179 | 182 |
| |
180 | 183 |
| |
181 | 184 |
| |
| |||
314 | 317 |
| |
315 | 318 |
| |
316 | 319 |
| |
317 |
| - | |
318 |
| - | |
| 320 | + | |
| 321 | + | |
319 | 322 |
| |
320 | 323 |
| |
321 | 324 |
| |
|
0 commit comments
Comments
(0)