Commit 022350b
committed
Minimize slot creation for multi-inserts of pg_shdepend
When doing multiple insertions in pg_shdepend for the copy of dependencies from a template database in CREATE DATABASE, the same number of slots would have been created and used all the time. As the number of items to insert is not known in advance, this makes most of the slots created for nothing. This improves the slot handling so as slot creation only happens when needed, minimizing the overhead of the operation. Author: Michael Paquier Reviewed-by: Daniel Gustafsson Discussion: https://postgr.es/m/20200731024148.GB3317@paquier.xyz1 parent 84c0e4b commit 022350b
1 file changed
+16
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
809 | 809 | | |
810 | 810 | | |
811 | 811 | | |
812 | | - | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
813 | 815 | | |
814 | 816 | | |
815 | 817 | | |
816 | 818 | | |
817 | | - | |
818 | | - | |
819 | | - | |
820 | | - | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
821 | 825 | | |
822 | 826 | | |
823 | 827 | | |
| |||
842 | 846 | | |
843 | 847 | | |
844 | 848 | | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
845 | 852 | | |
846 | 853 | | |
847 | 854 | | |
| |||
858 | 865 | | |
859 | 866 | | |
860 | 867 | | |
861 | | - | |
| 868 | + | |
862 | 869 | | |
863 | 870 | | |
864 | 871 | | |
| 872 | + | |
865 | 873 | | |
866 | 874 | | |
867 | 875 | | |
| |||
874 | 882 | | |
875 | 883 | | |
876 | 884 | | |
| 885 | + | |
| 886 | + | |
877 | 887 | | |
878 | 888 | | |
879 | 889 | | |
| |||
0 commit comments