forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit56b3b38
committed
Fix incorrect index behavior in COPY FROM with partitioned tables
86b8504 rewrote how COPY FROM works to allow multiple tuple buffers toexist to once thus allowing multi-inserts to be used in more cases withpartitioned tables. That commit neglected to update the estate'ses_result_relation_info when flushing the insert buffer to the partitionmaking it possible for the index tuples to be added into an index on thewrong partition.Fix this and also add an Assert in ExecInsertIndexTuples to help ensurethat we never make this mistake again.Reported-by: Haruka TakatsukaAuthor: Ashutosh SharmaDiscussion:https://postgr.es/m/15832-b1bf336a4ee246b5@postgresql.org1 parentf7e954a commit56b3b38
File tree
4 files changed
+36
-0
lines changed- src
- backend
- commands
- executor
- test/regress
- input
- output
4 files changed
+36
-0
lines changedLines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2446 | 2446 |
| |
2447 | 2447 |
| |
2448 | 2448 |
| |
| 2449 | + | |
| 2450 | + | |
| 2451 | + | |
2449 | 2452 |
| |
2450 | 2453 |
| |
2451 | 2454 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
299 | 299 |
| |
300 | 300 |
| |
301 | 301 |
| |
| 302 | + | |
| 303 | + | |
| 304 | + | |
302 | 305 |
| |
303 | 306 |
| |
304 | 307 |
| |
|
Lines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
187 | 187 |
| |
188 | 188 |
| |
189 | 189 |
| |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
190 | 203 |
|
Lines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
147 | 147 |
| |
148 | 148 |
| |
149 | 149 |
| |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
150 | 167 |
|
0 commit comments
Comments
(0)