forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit277cb78
committed
Don't reuse slots between root and partition in ON CONFLICT ... UPDATE.
Until now the the slot to store the conflicting tuple, and the resultof the ON CONFLICT SET, where reused between partitions. Thatnecessitated changing slots descriptor when switching partitions.Besides the overhead of switching descriptors on a slot (whichrequires memory allocations and prevents JITing), that's importantlyalso problematic for tableam. There individual partitions might belongto different tableams, needing different kinds of slots.In passing also fix ExecOnConflictUpdate to clear the existing slot atexit. Otherwise that slot could continue to hold a pin till the queryends, which could be far too long if the input data set is large, andthere's no further conflicts. While previously also problematic, it'snow more important as there will be more such slots when partitioned.Author: Andres FreundReviewed-By: Robert Haas, David RowleyDiscussion:https://postgr.es/m/20180703070645.wchpu5muyto5n647@alap3.anarazel.de1 parentd16a74c commit277cb78
File tree
3 files changed
+64
-63
lines changed- src
- backend/executor
- include/nodes
3 files changed
+64
-63
lines changedLines changed: 38 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
723 | 723 |
| |
724 | 724 |
| |
725 | 725 |
| |
| 726 | + | |
726 | 727 |
| |
727 | 728 |
| |
| 729 | + | |
728 | 730 |
| |
729 | 731 |
| |
730 | 732 |
| |
731 | 733 |
| |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
732 | 746 |
| |
733 | 747 |
| |
734 |
| - | |
| 748 | + | |
735 | 749 |
| |
736 | 750 |
| |
737 | 751 |
| |
738 | 752 |
| |
739 |
| - | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
740 | 769 |
| |
741 | 770 |
| |
742 | 771 |
| |
743 | 772 |
| |
744 | 773 |
| |
745 | 774 |
| |
746 |
| - | |
747 |
| - | |
748 | 775 |
| |
749 | 776 |
| |
750 | 777 |
| |
| |||
778 | 805 |
| |
779 | 806 |
| |
780 | 807 |
| |
781 |
| - | |
782 |
| - | |
783 |
| - | |
784 |
| - | |
785 |
| - | |
786 |
| - | |
787 |
| - | |
| 808 | + | |
788 | 809 |
| |
789 |
| - | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
790 | 815 |
| |
791 | 816 |
| |
792 |
| - | |
| 817 | + | |
793 | 818 |
| |
794 |
| - | |
795 | 819 |
| |
796 | 820 |
| |
797 | 821 |
| |
|
Lines changed: 24 additions & 46 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1304 | 1304 |
| |
1305 | 1305 |
| |
1306 | 1306 |
| |
| 1307 | + | |
1307 | 1308 |
| |
1308 | 1309 |
| |
1309 | 1310 |
| |
| |||
1413 | 1414 |
| |
1414 | 1415 |
| |
1415 | 1416 |
| |
1416 |
| - | |
| 1417 | + | |
1417 | 1418 |
| |
1418 | 1419 |
| |
1419 | 1420 |
| |
| |||
1422 | 1423 |
| |
1423 | 1424 |
| |
1424 | 1425 |
| |
1425 |
| - | |
| 1426 | + | |
1426 | 1427 |
| |
1427 | 1428 |
| |
1428 | 1429 |
| |
1429 | 1430 |
| |
1430 | 1431 |
| |
1431 |
| - | |
| 1432 | + | |
1432 | 1433 |
| |
1433 | 1434 |
| |
1434 | 1435 |
| |
| |||
1451 | 1452 |
| |
1452 | 1453 |
| |
1453 | 1454 |
| |
1454 |
| - | |
| 1455 | + | |
1455 | 1456 |
| |
1456 | 1457 |
| |
1457 | 1458 |
| |
| |||
1469 | 1470 |
| |
1470 | 1471 |
| |
1471 | 1472 |
| |
1472 |
| - | |
| 1473 | + | |
| 1474 | + | |
1473 | 1475 |
| |
1474 | 1476 |
| |
1475 | 1477 |
| |
1476 |
| - | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
1477 | 1484 |
| |
1478 | 1485 |
| |
1479 | 1486 |
| |
| |||
1633 | 1640 |
| |
1634 | 1641 |
| |
1635 | 1642 |
| |
1636 |
| - | |
1637 | 1643 |
| |
1638 | 1644 |
| |
1639 | 1645 |
| |
| |||
1698 | 1704 |
| |
1699 | 1705 |
| |
1700 | 1706 |
| |
1701 |
| - | |
1702 |
| - | |
1703 |
| - | |
1704 |
| - | |
1705 |
| - | |
1706 |
| - | |
1707 |
| - | |
1708 |
| - | |
1709 |
| - | |
1710 |
| - | |
1711 |
| - | |
1712 |
| - | |
1713 |
| - | |
1714 | 1707 |
| |
1715 | 1708 |
| |
1716 | 1709 |
| |
| |||
2319 | 2312 |
| |
2320 | 2313 |
| |
2321 | 2314 |
| |
2322 |
| - | |
2323 |
| - | |
2324 |
| - | |
2325 |
| - | |
2326 |
| - | |
2327 |
| - | |
2328 |
| - | |
2329 |
| - | |
2330 |
| - | |
2331 |
| - | |
2332 |
| - | |
2333 | 2315 |
| |
2334 | 2316 |
| |
2335 | 2317 |
| |
2336 | 2318 |
| |
2337 | 2319 |
| |
2338 | 2320 |
| |
2339 |
| - | |
2340 |
| - | |
2341 |
| - | |
2342 |
| - | |
2343 |
| - | |
2344 |
| - | |
2345 |
| - | |
2346 |
| - | |
2347 |
| - | |
| 2321 | + | |
| 2322 | + | |
| 2323 | + | |
| 2324 | + | |
| 2325 | + | |
| 2326 | + | |
2348 | 2327 |
| |
2349 |
| - | |
2350 |
| - | |
2351 |
| - | |
2352 |
| - | |
2353 |
| - | |
| 2328 | + | |
| 2329 | + | |
| 2330 | + | |
2354 | 2331 |
| |
2355 | 2332 |
| |
2356 | 2333 |
| |
2357 | 2334 |
| |
2358 |
| - | |
| 2335 | + | |
| 2336 | + | |
2359 | 2337 |
| |
2360 | 2338 |
| |
2361 | 2339 |
| |
|
Lines changed: 2 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
377 | 377 |
| |
378 | 378 |
| |
379 | 379 |
| |
| 380 | + | |
| 381 | + | |
380 | 382 |
| |
381 |
| - | |
382 | 383 |
| |
383 | 384 |
| |
384 | 385 |
| |
| |||
1109 | 1110 |
| |
1110 | 1111 |
| |
1111 | 1112 |
| |
1112 |
| - | |
1113 | 1113 |
| |
1114 |
| - | |
1115 | 1114 |
| |
1116 | 1115 |
| |
1117 | 1116 |
| |
|
0 commit comments
Comments
(0)