pgsql: Use multi-inserts for pg_depend
От | Michael Paquier |
---|---|
Тема | pgsql: Use multi-inserts for pg_depend |
Дата | |
Msg-id | E1kEQFA-0005pM-Gq@gemulon.postgresql.org обсуждение исходный текст |
Список | pgsql-committers |
Use multi-inserts for pg_depend This is a follow-up of the work done in e3931d01. This case is a bit different than pg_attribute and pg_shdepend: the maximum number of items to insert is known in advance, but there is no need to handle pinned dependencies. Hence, the base allocation for slots is done based on the number of items and the maximum allowed with a cap at 64kB. Slots are initialized once used to minimize the overhead of the operation. The insertions can be done for dependencies of the same type. More could be done by grouping the insertion of multiple dependency types in a single batch. This is left as future work. Some of the multi-insert logic is also simplified for pg_shdepend, as per the feedback discussed for this specific patch. This also moves to indexing.h the variable capping the maximum amount of data that can be used at once for a multi-insert, instead of having separate definitions for pg_attribute, pg_depend and pg_shdepend. Author: Daniel Gustafsson, Michael Paquier Reviewed-by: Andres Freund, Álvaro Herrera Discussion: https://postgr.es/m/20200807061619.GA23955@paquier.xyz Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/63110c6264a5363863209c8fbdd0498c03535507 Modified Files -------------- src/backend/catalog/heap.c | 8 +--- src/backend/catalog/pg_depend.c | 90 ++++++++++++++++++++++++++++----------- src/backend/catalog/pg_shdepend.c | 66 ++++++++++++++-------------- src/include/catalog/indexing.h | 6 +++ 4 files changed, 105 insertions(+), 65 deletions(-)
В списке pgsql-committers по дате отправления: