forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7e0d64c
committed
postgres_fdw: Push down partition-wise aggregation.
Since commit7012b13, postgres_fdwhas been able to push down the toplevel aggregation operation to theremote server. Commite2f1eb0 madeit possible to break down the toplevel aggregation into oneaggregate per partition. This commit lets postgres_fdw push downaggregation in that case just as it does at the top level.In order to make this work, this commit adds an additional argumentto the GetForeignUpperPaths FDW API. A matching argument is addedto the signature for create_upper_paths_hook. Third-party code usingeither of these will need to be updated.Also adjust create_foreignscan_plan() so that it picks up the correctset of relids in this case.Jeevan Chalke, reviewed by Ashutosh Bapat and by me and with someadjustments by me. The larger patch series of which this patch is apart was also reviewed and tested by Antonin Houska, RajkumarRaghuwanshi, David Rowley, Dilip Kumar, Konstantin Knizhnik, PascalLegrand, and Rafia Sabih.Discussion:http://postgr.es/m/CAM2+6=V64_xhstVHie0Rz=KPEQnLJMZt_e314P0jaT_oJ9MR8A@mail.gmail.comDiscussion:http://postgr.es/m/CAM2+6=XPWujjmj5zUaBTGDoB38CemwcPmjkRy0qOcsQj_V+2sQ@mail.gmail.com1 parent0b11a67 commit7e0d64c
File tree
9 files changed
+251
-33
lines changed- contrib/postgres_fdw
- expected
- sql
- doc/src/sgml
- src
- backend/optimizer
- plan
- prep
- include
- foreign
- optimizer
9 files changed
+251
-33
lines changedLines changed: 132 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7851 | 7851 |
| |
7852 | 7852 |
| |
7853 | 7853 |
| |
| 7854 | + | |
| 7855 | + | |
| 7856 | + | |
| 7857 | + | |
| 7858 | + | |
| 7859 | + | |
| 7860 | + | |
| 7861 | + | |
| 7862 | + | |
| 7863 | + | |
| 7864 | + | |
| 7865 | + | |
| 7866 | + | |
| 7867 | + | |
| 7868 | + | |
| 7869 | + | |
| 7870 | + | |
| 7871 | + | |
| 7872 | + | |
| 7873 | + | |
| 7874 | + | |
| 7875 | + | |
| 7876 | + | |
| 7877 | + | |
| 7878 | + | |
| 7879 | + | |
| 7880 | + | |
| 7881 | + | |
| 7882 | + | |
| 7883 | + | |
| 7884 | + | |
| 7885 | + | |
| 7886 | + | |
| 7887 | + | |
| 7888 | + | |
| 7889 | + | |
| 7890 | + | |
| 7891 | + | |
| 7892 | + | |
| 7893 | + | |
| 7894 | + | |
| 7895 | + | |
| 7896 | + | |
| 7897 | + | |
| 7898 | + | |
| 7899 | + | |
| 7900 | + | |
| 7901 | + | |
| 7902 | + | |
| 7903 | + | |
| 7904 | + | |
| 7905 | + | |
| 7906 | + | |
| 7907 | + | |
| 7908 | + | |
| 7909 | + | |
| 7910 | + | |
| 7911 | + | |
| 7912 | + | |
| 7913 | + | |
| 7914 | + | |
| 7915 | + | |
| 7916 | + | |
| 7917 | + | |
| 7918 | + | |
| 7919 | + | |
| 7920 | + | |
| 7921 | + | |
| 7922 | + | |
| 7923 | + | |
| 7924 | + | |
| 7925 | + | |
| 7926 | + | |
| 7927 | + | |
| 7928 | + | |
| 7929 | + | |
| 7930 | + | |
| 7931 | + | |
| 7932 | + | |
| 7933 | + | |
| 7934 | + | |
| 7935 | + | |
| 7936 | + | |
| 7937 | + | |
| 7938 | + | |
| 7939 | + | |
| 7940 | + | |
| 7941 | + | |
| 7942 | + | |
| 7943 | + | |
| 7944 | + | |
| 7945 | + | |
| 7946 | + | |
| 7947 | + | |
| 7948 | + | |
| 7949 | + | |
| 7950 | + | |
| 7951 | + | |
| 7952 | + | |
| 7953 | + | |
| 7954 | + | |
| 7955 | + | |
| 7956 | + | |
| 7957 | + | |
| 7958 | + | |
| 7959 | + | |
| 7960 | + | |
| 7961 | + | |
| 7962 | + | |
| 7963 | + | |
| 7964 | + | |
| 7965 | + | |
| 7966 | + | |
| 7967 | + | |
| 7968 | + | |
| 7969 | + | |
| 7970 | + | |
| 7971 | + | |
| 7972 | + | |
| 7973 | + | |
| 7974 | + | |
| 7975 | + | |
| 7976 | + | |
| 7977 | + | |
| 7978 | + | |
| 7979 | + | |
| 7980 | + | |
| 7981 | + | |
| 7982 | + | |
| 7983 | + | |
| 7984 | + | |
| 7985 | + |
Lines changed: 37 additions & 16 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
352 | 352 |
| |
353 | 353 |
| |
354 | 354 |
| |
355 |
| - | |
| 355 | + | |
| 356 | + | |
356 | 357 |
| |
357 | 358 |
| |
358 | 359 |
| |
| |||
419 | 420 |
| |
420 | 421 |
| |
421 | 422 |
| |
422 |
| - | |
| 423 | + | |
| 424 | + | |
423 | 425 |
| |
424 | 426 |
| |
425 | 427 |
| |
426 | 428 |
| |
427 | 429 |
| |
428 | 430 |
| |
429 | 431 |
| |
430 |
| - | |
| 432 | + | |
| 433 | + | |
431 | 434 |
| |
432 | 435 |
| |
433 | 436 |
| |
| |||
2775 | 2778 |
| |
2776 | 2779 |
| |
2777 | 2780 |
| |
2778 |
| - | |
| 2781 | + | |
2779 | 2782 |
| |
2780 | 2783 |
| |
2781 | 2784 |
| |
2782 | 2785 |
| |
2783 | 2786 |
| |
| 2787 | + | |
| 2788 | + | |
| 2789 | + | |
2784 | 2790 |
| |
2785 | 2791 |
| |
2786 | 2792 |
| |
| |||
2805 | 2811 |
| |
2806 | 2812 |
| |
2807 | 2813 |
| |
| 2814 | + | |
| 2815 | + | |
| 2816 | + | |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
2808 | 2820 |
| |
2809 | 2821 |
| |
2810 | 2822 |
| |
| |||
5017 | 5029 |
| |
5018 | 5030 |
| |
5019 | 5031 |
| |
5020 |
| - | |
| 5032 | + | |
| 5033 | + | |
5021 | 5034 |
| |
5022 | 5035 |
| |
5023 |
| - | |
5024 | 5036 |
| |
| 5037 | + | |
5025 | 5038 |
| |
5026 | 5039 |
| |
5027 | 5040 |
| |
| |||
5131 | 5144 |
| |
5132 | 5145 |
| |
5133 | 5146 |
| |
5134 |
| - | |
| 5147 | + | |
5135 | 5148 |
| |
5136 | 5149 |
| |
5137 | 5150 |
| |
5138 |
| - | |
| 5151 | + | |
5139 | 5152 |
| |
5140 | 5153 |
| |
5141 | 5154 |
| |
| |||
5232 | 5245 |
| |
5233 | 5246 |
| |
5234 | 5247 |
| |
5235 |
| - | |
| 5248 | + | |
| 5249 | + | |
5236 | 5250 |
| |
5237 | 5251 |
| |
5238 | 5252 |
| |
| |||
5252 | 5266 |
| |
5253 | 5267 |
| |
5254 | 5268 |
| |
5255 |
| - | |
| 5269 | + | |
| 5270 | + | |
5256 | 5271 |
| |
5257 | 5272 |
| |
5258 | 5273 |
| |
| |||
5264 | 5279 |
| |
5265 | 5280 |
| |
5266 | 5281 |
| |
5267 |
| - | |
| 5282 | + | |
| 5283 | + | |
5268 | 5284 |
| |
5269 | 5285 |
| |
5270 | 5286 |
| |
5271 | 5287 |
| |
5272 | 5288 |
| |
5273 |
| - | |
5274 | 5289 |
| |
5275 | 5290 |
| |
5276 | 5291 |
| |
| |||
5281 | 5296 |
| |
5282 | 5297 |
| |
5283 | 5298 |
| |
5284 |
| - | |
| 5299 | + | |
| 5300 | + | |
5285 | 5301 |
| |
5286 | 5302 |
| |
5287 | 5303 |
| |
| |||
5295 | 5311 |
| |
5296 | 5312 |
| |
5297 | 5313 |
| |
5298 |
| - | |
5299 |
| - | |
| 5314 | + | |
| 5315 | + | |
| 5316 | + | |
| 5317 | + | |
| 5318 | + | |
| 5319 | + | |
| 5320 | + | |
5300 | 5321 |
| |
5301 | 5322 |
| |
5302 | 5323 |
| |
| |||
5312 | 5333 |
| |
5313 | 5334 |
| |
5314 | 5335 |
| |
5315 |
| - | |
| 5336 | + | |
5316 | 5337 |
| |
5317 | 5338 |
| |
5318 | 5339 |
| |
|
Lines changed: 51 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1932 | 1932 |
| |
1933 | 1933 |
| |
1934 | 1934 |
| |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
| 1949 | + | |
| 1950 | + | |
| 1951 | + | |
| 1952 | + | |
| 1953 | + | |
| 1954 | + | |
| 1955 | + | |
| 1956 | + | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + |
Lines changed: 7 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
359 | 359 |
| |
360 | 360 |
| |
361 | 361 |
| |
362 |
| - | |
| 362 | + | |
| 363 | + | |
363 | 364 |
| |
364 | 365 |
| |
365 | 366 |
| |
| |||
379 | 380 |
| |
380 | 381 |
| |
381 | 382 |
| |
382 |
| - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
383 | 388 |
| |
384 | 389 |
| |
385 | 390 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3572 | 3572 |
| |
3573 | 3573 |
| |
3574 | 3574 |
| |
3575 |
| - | |
| 3575 | + | |
3576 | 3576 |
| |
3577 | 3577 |
| |
3578 | 3578 |
| |
|
0 commit comments
Comments
(0)