- Notifications
You must be signed in to change notification settings - Fork28
Commit2144601

Etsuro Fujita
postgres_fdw: Account for triggers in non-direct remote UPDATE planning.
Previously, in postgresPlanForeignModify, we planned an UPDATE operationon a foreign table so that we transmit only columns that were explicitlytargets of the UPDATE, so as to avoid unnecessary data transmission, butif there were BEFORE ROW UPDATE triggers on the foreign table, thosetriggers might change values for non-target columns, in which case wewould miss sending changed values for those columns. Prevent optimizingaway transmitting all columns if there are BEFORE ROW UPDATE triggers onthe foreign table.This is an oversight in commit7cbe57c which added triggers on foreigntables, so apply the patch all the way back to 9.4 where that came in.Author: Shohei MochizukiReviewed-by: Amit LangoteDiscussion:https://postgr.es/m/201905270152.x4R1q3qi014550@toshiba.co.jp1 parentafaa32d commit2144601
File tree
3 files changed
+44
-13
lines changed- contrib/postgres_fdw
- expected
- sql
3 files changed
+44
-13
lines changedLines changed: 26 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6577 | 6577 |
| |
6578 | 6578 |
| |
6579 | 6579 |
| |
| 6580 | + | |
| 6581 | + | |
| 6582 | + | |
| 6583 | + | |
| 6584 | + | |
| 6585 | + | |
| 6586 | + | |
| 6587 | + | |
| 6588 | + | |
| 6589 | + | |
| 6590 | + | |
| 6591 | + | |
| 6592 | + | |
| 6593 | + | |
| 6594 | + | |
| 6595 | + | |
| 6596 | + | |
| 6597 | + | |
| 6598 | + | |
6580 | 6599 |
| |
6581 | 6600 |
| |
6582 | 6601 |
| |
| |||
6689 | 6708 |
| |
6690 | 6709 |
| |
6691 | 6710 |
| |
6692 |
| - | |
| 6711 | + | |
6693 | 6712 |
| |
6694 | 6713 |
| |
6695 | 6714 |
| |
| |||
6793 | 6812 |
| |
6794 | 6813 |
| |
6795 | 6814 |
| |
6796 |
| - | |
6797 |
| - | |
| 6815 | + | |
| 6816 | + | |
6798 | 6817 |
| |
6799 |
| - | |
| 6818 | + | |
6800 | 6819 |
| |
6801 | 6820 |
| |
6802 | 6821 |
| |
| |||
7423 | 7442 |
| |
7424 | 7443 |
| |
7425 | 7444 |
| |
7426 |
| - | |
7427 |
| - | |
| 7445 | + | |
| 7446 | + | |
7428 | 7447 |
| |
7429 | 7448 |
| |
7430 | 7449 |
| |
7431 |
| - | |
| 7450 | + | |
7432 | 7451 |
| |
7433 | 7452 |
| |
7434 | 7453 |
| |
|
Lines changed: 13 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1620 | 1620 |
| |
1621 | 1621 |
| |
1622 | 1622 |
| |
1623 |
| - | |
1624 |
| - | |
1625 |
| - | |
1626 |
| - | |
1627 |
| - | |
1628 |
| - | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
1629 | 1636 |
| |
1630 | 1637 |
| |
1631 | 1638 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1481 | 1481 |
| |
1482 | 1482 |
| |
1483 | 1483 |
| |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
1484 | 1489 |
| |
1485 | 1490 |
| |
1486 | 1491 |
| |
|
0 commit comments
Comments
(0)