forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite5691cc
committed
Don't use_physical_tlist for an IOS with non-returnable columns.
createplan.c tries to save a runtime projection step by specifyinga scan plan node's output as being exactly the table's columns, orindex's columns in the case of an index-only scan, if there is not areason to do otherwise. This logic did not previously pay attentionto whether an index's columns are returnable. That worked, sort ofaccidentally, until commit9a3ddeb taught setrefs.c to reject plansthat try to read a non-returnable column. I have no desire to loosensetrefs.c's new check, so instead adjust use_physical_tlist() to nottry to optimize this way when there are non-returnable column(s).Per report from Ryan Kelly. Like the previous patch, back-patchto all supported branches.Discussion:https://postgr.es/m/CAHUie24ddN+pDNw7fkhNrjrwAX=fXXfGZZEHhRuofV_N_ftaSg@mail.gmail.com1 parent549ec20 commite5691cc
File tree
3 files changed
+37
-0
lines changed- src
- backend/optimizer/plan
- test/regress
- expected
- sql
3 files changed
+37
-0
lines changedLines changed: 16 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
914 | 914 |
| |
915 | 915 |
| |
916 | 916 |
| |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
917 | 933 |
| |
918 | 934 |
| |
919 | 935 |
| |
|
Lines changed: 16 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
357 | 357 |
| |
358 | 358 |
| |
359 | 359 |
| |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
360 | 376 |
| |
361 | 377 |
| |
362 | 378 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
159 | 159 |
| |
160 | 160 |
| |
161 | 161 |
| |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
162 | 167 |
| |
163 | 168 |
| |
164 | 169 |
| |
|
0 commit comments
Comments
(0)