forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita1c649d
committed
Pass all scan keys to BRIN consistent function at once
This commit changes how we pass scan keys to BRIN consistent function.Instead of passing them one by one, we now pass all scan keys for agiven attribute at once. That makes the consistent function a bit morecomplex, as it has to loop through the keys, but it does allow moreelaborate opclasses that can use multiple keys to eliminate ranges muchmore effectively.The existing BRIN opclasses (minmax, inclusion) don't really benefitfrom this change. The primary purpose is to allow future opclases tobenefit from seeing all keys at once.This does change the BRIN API, because the signature of the consistentfunction changes (a new parameter with number of scan keys). So thisbreaks existing opclasses, and will require supporting two variants ofthe code for different PostgreSQL versions. We've considered supportingtwo variants of the consistent, but we've decided not to do that.Firstly, there's another patch that moves handling of NULL values fromthe opclass, which means the opclasses need to be updated anyway.Secondly, we're not aware of any out-of-core BRIN opclasses, so it doesnot seem worth the extra complexity.Bump catversion, because of pg_proc changes.Author: Tomas Vondra <tomas.vondra@postgresql.org>Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org>Reviewed-by: Mark Dilger <hornschnorter@gmail.com>Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com>Reviewed-by: John Naylor <john.naylor@enterprisedb.com>Reviewed-by: Nikita Glukhov <n.gluhov@postgrespro.ru>Discussion:https://postgr.es/m/c1138ead-7668-f0e1-0638-c3be3237e812@2ndquadrant.com1 parentbfa2cee commita1c649d
File tree
7 files changed
+268
-98
lines changed- doc/src/sgml
- src
- backend/access/brin
- include/catalog
7 files changed
+268
-98
lines changedLines changed: 5 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
464 | 464 |
| |
465 | 465 |
| |
466 | 466 |
| |
467 |
| - | |
| 467 | + | |
468 | 468 |
| |
469 | 469 |
| |
470 |
| - | |
471 |
| - | |
| 470 | + | |
| 471 | + | |
472 | 472 |
| |
| 473 | + | |
| 474 | + | |
473 | 475 |
| |
474 | 476 |
| |
475 | 477 |
| |
|
Lines changed: 83 additions & 33 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
390 | 390 |
| |
391 | 391 |
| |
392 | 392 |
| |
| 393 | + | |
| 394 | + | |
| 395 | + | |
393 | 396 |
| |
394 | 397 |
| |
395 | 398 |
| |
| |||
411 | 414 |
| |
412 | 415 |
| |
413 | 416 |
| |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
414 | 476 |
| |
415 | 477 |
| |
416 | 478 |
| |
| |||
471 | 533 |
| |
472 | 534 |
| |
473 | 535 |
| |
474 |
| - | |
| 536 | + | |
475 | 537 |
| |
476 | 538 |
| |
477 | 539 |
| |
| |||
481 | 543 |
| |
482 | 544 |
| |
483 | 545 |
| |
484 |
| - | |
| 546 | + | |
485 | 547 |
| |
486 |
| - | |
487 |
| - | |
488 |
| - | |
| 548 | + | |
489 | 549 |
| |
| 550 | + | |
490 | 551 |
| |
491 |
| - | |
492 |
| - | |
493 |
| - | |
494 |
| - | |
495 |
| - | |
496 |
| - | |
497 |
| - | |
498 |
| - | |
499 |
| - | |
500 |
| - | |
501 |
| - | |
502 |
| - | |
503 |
| - | |
504 |
| - | |
505 |
| - | |
506 |
| - | |
507 |
| - | |
508 |
| - | |
509 |
| - | |
510 |
| - | |
511 |
| - | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
512 | 560 |
| |
513 | 561 |
| |
514 | 562 |
| |
515 | 563 |
| |
516 | 564 |
| |
517 | 565 |
| |
518 |
| - | |
519 |
| - | |
520 |
| - | |
521 |
| - | |
| 566 | + | |
| 567 | + | |
522 | 568 |
| |
523 |
| - | |
524 |
| - | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
525 | 574 |
| |
526 | 575 |
| |
527 |
| - | |
| 576 | + | |
| 577 | + | |
528 | 578 |
| |
529 | 579 |
| |
530 | 580 |
| |
|
0 commit comments
Comments
(0)