- Notifications
You must be signed in to change notification settings - Fork5.2k
Commit78ebda6
committed
Speed up truncation of temporary relations.
Previously, truncating a temporary relation required scanning the entirelocal buffer pool once per relation fork to invalidate buffers. This couldbe slow, especially with a large local buffers, as the scan was repeatedmultiple times.A similar issue with regular tables (shared buffers) was addressed incommit6d05086 by scanning the buffer pool only once for all forks.This commit applies the same optimization to temporary relations,improving truncation performance.Author: Daniil Davydov <3danissimo@gmail.com>Reviewed-by: Michael Paquier <michael@paquier.xyz>Reviewed-by: Fujii Masao <masao.fujii@gmail.com>Reviewed-by: Dilip Kumar <dilipbalaut@gmail.com>Reviewed-by: Maxim Orlov <orlovmg@gmail.com>Discussion:https://postgr.es/m/CAJDiXggNqsJOH7C5co4jA8nDk8vw-=sokyh5s1_TENWnC6Ofcg@mail.gmail.com1 parent931766a commit78ebda6
File tree
3 files changed
+19
-14
lines changed- src
- backend/storage/buffer
- include/storage
3 files changed
+19
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4550 | 4550 | | |
4551 | 4551 | | |
4552 | 4552 | | |
4553 | | - | |
4554 | | - | |
4555 | | - | |
4556 | | - | |
4557 | | - | |
| 4553 | + | |
| 4554 | + | |
| 4555 | + | |
4558 | 4556 | | |
4559 | 4557 | | |
4560 | 4558 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
660 | 660 | | |
661 | 661 | | |
662 | 662 | | |
663 | | - | |
664 | | - | |
| 663 | + | |
| 664 | + | |
665 | 665 | | |
666 | 666 | | |
| 667 | + | |
667 | 668 | | |
668 | 669 | | |
669 | 670 | | |
| |||
672 | 673 | | |
673 | 674 | | |
674 | 675 | | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
679 | 681 | | |
680 | | - | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
681 | 688 | | |
682 | 689 | | |
683 | 690 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
489 | | - | |
490 | | - | |
| 489 | + | |
| 490 | + | |
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
| |||
0 commit comments
Comments
(0)