forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit927f453
committed
Fix tuple routing to initialize batching only for inserts
A cross-partition update on a partitioned table is implemented as adelete followed by an insert. With foreign partitions, this was howevercausing issues, because the FDW and core may disagree on when to enablebatching. postgres_fdw was only allowing batching for plain inserts(CMD_INSERT) while core was trying to batch the insert component of thecross-partition update. Fix by restricting core to apply batching onlyto plain CMD_INSERT queries.It's possible to allow batching for cross-partition updates, but thatwill require more extensive changes, so better to leave that for aseparate patch.Author: Amit LangoteReviewed-by: Tomas Vondra, Takayuki TsunakawaDiscussion:https://postgr.es/m/20200628151002.7x5laxwpgvkyiu3q@development1 parentc15283f commit927f453
File tree
4 files changed
+53
-5
lines changed- contrib/postgres_fdw
- expected
- sql
- src/backend/executor
4 files changed
+53
-5
lines changedLines changed: 22 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9414 | 9414 |
| |
9415 | 9415 |
| |
9416 | 9416 |
| |
| 9417 | + | |
| 9418 | + | |
| 9419 | + | |
| 9420 | + | |
| 9421 | + | |
| 9422 | + | |
| 9423 | + | |
| 9424 | + | |
| 9425 | + | |
| 9426 | + | |
| 9427 | + | |
| 9428 | + | |
| 9429 | + | |
| 9430 | + | |
| 9431 | + | |
| 9432 | + | |
| 9433 | + | |
| 9434 | + | |
| 9435 | + | |
| 9436 | + | |
| 9437 | + | |
9417 | 9438 |
| |
9418 |
| - | |
| 9439 | + |
Lines changed: 11 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1934 | 1934 |
| |
1935 | 1935 |
| |
1936 | 1936 |
| |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
1937 | 1940 |
| |
1938 | 1941 |
| |
1939 | 1942 |
| |
1940 | 1943 |
| |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
| 1949 | + | |
1941 | 1950 |
| |
1942 | 1951 |
| |
1943 | 1952 |
| |
1944 | 1953 |
| |
1945 | 1954 |
| |
1946 |
| - | |
1947 |
| - | |
| 1955 | + | |
| 1956 | + | |
1948 | 1957 |
| |
1949 | 1958 |
| |
1950 | 1959 |
| |
|
Lines changed: 18 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2909 | 2909 |
| |
2910 | 2910 |
| |
2911 | 2911 |
| |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
| 2915 | + | |
| 2916 | + | |
| 2917 | + | |
| 2918 | + | |
| 2919 | + | |
| 2920 | + | |
| 2921 | + | |
| 2922 | + | |
| 2923 | + | |
| 2924 | + | |
| 2925 | + | |
| 2926 | + | |
| 2927 | + | |
| 2928 | + | |
2912 | 2929 |
| |
2913 |
| - | |
| 2930 | + |
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1000 | 1000 |
| |
1001 | 1001 |
| |
1002 | 1002 |
| |
1003 |
| - | |
| 1003 | + | |
| 1004 | + | |
1004 | 1005 |
| |
1005 | 1006 |
| |
1006 | 1007 |
| |
|
0 commit comments
Comments
(0)