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: Switch to multi-inserts when registering dependencies for many c
Date: Sat, 05 Sep 2020 12:35:44 +0000
Message-ID: <E1kEXQ0-0000IT-5Z@gemulon.postgresql.org> (raw)

Switch to multi-inserts when registering dependencies for many code paths

This commit improves the dependency registrations by taking advantage of
the preliminary work done in 63110c62, to group together the insertion
of dependencies of the same type to pg_depend.  With the current layer
of routines available, and as only dependencies of the same type can be
grouped, there are code paths still doing more than one multi-insert
when it is necessary to register dependencies of multiple types
(constraint and index creation are two cases doing that).

While on it, this refactors some of the code to use ObjectAddressSet()
when manipulating object addresses.

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/8febfd1855450f50f17419def41c2ea9bcf994d5

Modified Files
--------------
src/backend/catalog/heap.c                 | 59 +++++++++-----------
src/backend/catalog/index.c                | 21 +++++--
src/backend/catalog/pg_aggregate.c         | 23 +++++---
src/backend/catalog/pg_cast.c              | 28 +++++-----
src/backend/catalog/pg_constraint.c        | 34 ++++++++---
src/backend/catalog/pg_operator.c          | 20 ++++---
src/backend/catalog/pg_proc.c              | 30 ++++++----
src/backend/catalog/pg_range.c             | 39 ++++++-------
src/backend/catalog/pg_type.c              | 64 ++++++++++++---------
src/backend/commands/functioncmds.c        | 34 +++++------
src/backend/commands/proclang.c            | 24 ++++----
src/backend/commands/tsearchcmds.c         | 90 +++++++++++++++---------------
src/test/regress/expected/create_index.out |  6 +-
13 files changed, 252 insertions(+), 220 deletions(-)



Message-ID: <E1kEXQ0-0000IT-5Z@gemulon.postgresql.org>
Permalink:  ../E1kEXQ0-0000IT-5Z@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1kEXQ0-0000IT-5Z@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: Switch to multi-inserts when registering dependencies for many c
  In-Reply-To: <E1kEXQ0-0000IT-5Z@gemulon.postgresql.org>
  References: <E1kEXQ0-0000IT-5Z@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