- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitb1ecb9b
committed
Fix interaction of partitioned tables with BulkInsertState.
When copying into a partitioned table, the target heap may change fromone tuple to next. We must ask ReadBufferBI() to get a new bufferevery time such change occurs. To do that, use new functionReleaseBulkInsertStatePin(). This fixes the bug that tuples ended upbeing inserted into the wrong partition, which occurred exactlybecause the wrong buffer was used.Amit Langote, per a suggestion from Robert Haas. Some cosmeticadjustments by me.Reports by 高增琦 (Gao Zengqi), Venkata B Nagothi, andRagnar Ouchterlony.Discussion:http://postgr.es/m/CAFmBtr32FDOqofo8yG-4mjzL1HnYHxXK5S9OGFJ%3D%3DcJpgEW4vA%40mail.gmail.comDiscussion:http://postgr.es/m/CAEyp7J9WiX0L3DoiNcRrY-9iyw%3DqP%2Bj%3DDLsAnNFF1xT2J1ggfQ%40mail.gmail.comDiscussion:http://postgr.es/m/16d73804-c9cd-14c5-463e-5caad563ff77%40agama.tvDiscussion:http://postgr.es/m/CA+TgmoaiZpDVUUN8LZ4jv1qFE_QyR+H9ec+79f5vNczYarg5Zg@mail.gmail.com1 parent3eaf03b commitb1ecb9b
3 files changed
+24
-0
lines changedLines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2324 | 2324 |
| |
2325 | 2325 |
| |
2326 | 2326 |
| |
| 2327 | + | |
| 2328 | + | |
| 2329 | + | |
| 2330 | + | |
| 2331 | + | |
| 2332 | + | |
| 2333 | + | |
| 2334 | + | |
| 2335 | + | |
| 2336 | + | |
| 2337 | + | |
2327 | 2338 |
| |
2328 | 2339 |
| |
2329 | 2340 |
| |
|
Lines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2307 | 2307 |
| |
2308 | 2308 |
| |
2309 | 2309 |
| |
| 2310 | + | |
2310 | 2311 |
| |
2311 | 2312 |
| |
2312 | 2313 |
| |
| |||
2561 | 2562 |
| |
2562 | 2563 |
| |
2563 | 2564 |
| |
| 2565 | + | |
| 2566 | + | |
| 2567 | + | |
| 2568 | + | |
| 2569 | + | |
| 2570 | + | |
| 2571 | + | |
| 2572 | + | |
| 2573 | + | |
| 2574 | + | |
| 2575 | + | |
2564 | 2576 |
| |
2565 | 2577 |
| |
2566 | 2578 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
147 | 147 |
| |
148 | 148 |
| |
149 | 149 |
| |
| 150 | + | |
150 | 151 |
| |
151 | 152 |
| |
152 | 153 |
| |
|
0 commit comments
Comments
(0)