• Michael Paquier's avatar
    Minimize slot creation for multi-inserts of pg_shdepend · 022350b8
    Michael Paquier authored
    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
    022350b8
pg_shdepend.c 44.1 KB