Minimize slot creation for multi-inserts of pg_shdepend
Michael Paquier <michael@paquier.xyz>
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.xyz
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/catalog/pg_shdepend.c | modified | +16 −6 |
Discussion
- Ought to use heap_multi_insert() for pg_attribute/depend insertions? 46 messages · 2019-02-13 → 2020-07-31