- Notifications
You must be signed in to change notification settings - Fork5
Commitc0c6acd
committed
Fix some planning oversights in postgres_fdw.
Include eval costs of local conditions in remote-estimate mode, and don'tassume the remote eval cost is zero in local-estimate mode. (The bestwe can do with that at the moment is to assume a seqscan, which may wellbe wildly pessimistic ... but zero won't do at all.)To get a reasonable local estimate, we need to know the relpages countfor the remote rel, so improve the ANALYZE code to fetch that ratherthan just setting the foreign table's relpages field to zero.1 parentaf0a4c5 commitc0c6acd
File tree
3 files changed
+104
-7
lines changed- contrib/postgres_fdw
3 files changed
+104
-7
lines changedLines changed: 23 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
456 | 456 |
| |
457 | 457 |
| |
458 | 458 |
| |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
459 | 482 |
| |
460 | 483 |
| |
461 | 484 |
| |
|
Lines changed: 80 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
259 | 259 |
| |
260 | 260 |
| |
261 | 261 |
| |
| 262 | + | |
| 263 | + | |
| 264 | + | |
262 | 265 |
| |
263 | 266 |
| |
264 | 267 |
| |
| |||
349 | 352 |
| |
350 | 353 |
| |
351 | 354 |
| |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
352 | 365 |
| |
353 | 366 |
| |
354 | 367 |
| |
| |||
367 | 380 |
| |
368 | 381 |
| |
369 | 382 |
| |
370 |
| - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
371 | 386 |
| |
372 | 387 |
| |
| 388 | + | |
373 | 389 |
| |
374 | 390 |
| |
375 | 391 |
| |
376 |
| - | |
377 |
| - | |
378 |
| - | |
379 |
| - | |
| 392 | + | |
380 | 393 |
| |
381 |
| - | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
382 | 402 |
| |
383 | 403 |
| |
384 | 404 |
| |
| |||
1068 | 1088 |
| |
1069 | 1089 |
| |
1070 | 1090 |
| |
1071 |
| - | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
1072 | 1099 |
| |
1073 | 1100 |
| |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
1074 | 1147 |
| |
1075 | 1148 |
| |
1076 | 1149 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
47 | 47 |
| |
48 | 48 |
| |
49 | 49 |
| |
| 50 | + | |
50 | 51 |
| |
51 | 52 |
| |
52 | 53 |
|
0 commit comments
Comments
(0)