forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc8ba697
committed
Fix logic bug in gistchoose and gistRelocateBuildBuffersOnSplit.
Every time the best-tuple-found-so-far changes, we need to reset allthe penalty values in which_grow[] to the penalties for the new besttuple. The old code failed to do this, resulting in inferior indexquality.The original patch from Alexander Korotkov was just two lines; I tookthe liberty of fleshing that out by adding a bunch of comments that Ihope will make this logic easier for others to understand than it wasfor me.1 parentd1a4db8 commitc8ba697
2 files changed
+80
-8
lines changedLines changed: 37 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
625 | 625 |
| |
626 | 626 |
| |
627 | 627 |
| |
628 |
| - | |
629 |
| - | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
630 | 635 |
| |
631 | 636 |
| |
632 | 637 |
| |
| |||
637 | 642 |
| |
638 | 643 |
| |
639 | 644 |
| |
640 |
| - | |
641 |
| - | |
642 |
| - | |
643 | 645 |
| |
644 | 646 |
| |
645 | 647 |
| |
646 | 648 |
| |
647 | 649 |
| |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
648 | 657 |
| |
649 | 658 |
| |
650 | 659 |
| |
| |||
653 | 662 |
| |
654 | 663 |
| |
655 | 664 |
| |
| 665 | + | |
| 666 | + | |
656 | 667 |
| |
657 | 668 |
| |
658 | 669 |
| |
| |||
664 | 675 |
| |
665 | 676 |
| |
666 | 677 |
| |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
667 | 687 |
| |
668 | 688 |
| |
669 |
| - | |
| 689 | + | |
670 | 690 |
| |
671 | 691 |
| |
672 | 692 |
| |
673 | 693 |
| |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
674 | 700 |
| |
| 701 | + | |
675 | 702 |
| |
676 | 703 |
| |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
677 | 708 |
| |
678 | 709 |
| |
679 | 710 |
| |
|
Lines changed: 43 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
363 | 363 |
| |
364 | 364 |
| |
365 | 365 |
| |
366 |
| - | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
367 | 372 |
| |
368 | 373 |
| |
369 | 374 |
| |
| |||
389 | 394 |
| |
390 | 395 |
| |
391 | 396 |
| |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
392 | 411 |
| |
393 | 412 |
| |
394 | 413 |
| |
395 | 414 |
| |
396 | 415 |
| |
397 | 416 |
| |
| 417 | + | |
| 418 | + | |
398 | 419 |
| |
399 | 420 |
| |
400 | 421 |
| |
| |||
409 | 430 |
| |
410 | 431 |
| |
411 | 432 |
| |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
412 | 442 |
| |
413 | 443 |
| |
414 |
| - | |
| 444 | + | |
415 | 445 |
| |
416 | 446 |
| |
417 | 447 |
| |
418 | 448 |
| |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
419 | 455 |
| |
| 456 | + | |
420 | 457 |
| |
421 | 458 |
| |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
422 | 463 |
| |
423 | 464 |
| |
424 | 465 |
| |
|
0 commit comments
Comments
(0)