pgsql: Switch to multi-inserts when registering dependencies for many c - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Switch to multi-inserts when registering dependencies for many c
Date
Msg-id E1kEXQ0-0000IT-5Z@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: Extend SQL function tests lightly
Next
From: Tom Lane
Date:
Subject: pgsql: Yet more elimination of dead stores and useless initializations.