pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Minimize slot creation for multi-inserts of pg_shdepend
Date: Sat, 01 Aug 2020 02:51:01 +0000
Message-ID: <E1k1hbx-00013h-IW@gemulon.postgresql.org> (raw)

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/022350b8495a8a7ff0ff8dd6791572e91e7cd6fe

Modified Files
--------------
src/backend/catalog/pg_shdepend.c | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)



Message-ID: <E1k1hbx-00013h-IW@gemulon.postgresql.org>
Permalink:  ../E1k1hbx-00013h-IW@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1k1hbx-00013h-IW@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Minimize slot creation for multi-inserts of pg_shdepend
  In-Reply-To: <E1k1hbx-00013h-IW@gemulon.postgresql.org>
  References: <E1k1hbx-00013h-IW@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox