pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Provide CatalogTupleDelete() as a wrapper around simple_heap_del
Date: Wed, 01 Feb 2017 21:13:38 +0000
Message-ID: <E1cZ2Di-0003P8-FR@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Provide CatalogTupleDelete() as a wrapper around simple_heap_delete().

This extends the work done in commit 2f5c9d9c9 to provide a more nearly
complete abstraction layer hiding the details of index updating for catalog
changes.  That commit only invented abstractions for catalog inserts and
updates, leaving nearby code for catalog deletes still calling the
heap-level routines directly.  That seems rather ugly from here, and it
does little to help if we ever want to shift to a storage system in which
indexing work is needed at delete time.

Hence, create a wrapper function CatalogTupleDelete(), and replace calls
of simple_heap_delete() on catalog tuples with it.  There are now very
few direct calls of [simple_]heap_delete remaining in the tree.

Discussion: https://postgr.es/m/462.1485902736@sss.pgh.pa.us

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/ab02896510e26e46b830c87eef2c03dd3c52c09e

Modified Files
--------------
src/backend/catalog/aclchk.c               |  6 ++++--
src/backend/catalog/dependency.c           |  4 ++--
src/backend/catalog/heap.c                 | 18 +++++++++---------
src/backend/catalog/index.c                |  2 +-
src/backend/catalog/indexing.c             | 16 ++++++++++++++++
src/backend/catalog/pg_collation.c         |  2 +-
src/backend/catalog/pg_constraint.c        |  2 +-
src/backend/catalog/pg_conversion.c        |  2 +-
src/backend/catalog/pg_db_role_setting.c   |  6 +++---
src/backend/catalog/pg_depend.c            |  6 +++---
src/backend/catalog/pg_enum.c              |  2 +-
src/backend/catalog/pg_largeobject.c       |  4 ++--
src/backend/catalog/pg_range.c             |  2 +-
src/backend/catalog/pg_shdepend.c          |  6 +++---
src/backend/commands/amcmds.c              |  2 +-
src/backend/commands/comment.c             |  8 ++++----
src/backend/commands/dbcommands.c          |  2 +-
src/backend/commands/event_trigger.c       |  2 +-
src/backend/commands/extension.c           |  2 +-
src/backend/commands/foreigncmds.c         |  6 +++---
src/backend/commands/functioncmds.c        |  8 ++++----
src/backend/commands/opclasscmds.c         |  8 ++++----
src/backend/commands/operatorcmds.c        |  2 +-
src/backend/commands/policy.c              |  2 +-
src/backend/commands/proclang.c            |  2 +-
src/backend/commands/publicationcmds.c     |  5 ++---
src/backend/commands/schemacmds.c          |  2 +-
src/backend/commands/seclabel.c            |  8 ++++----
src/backend/commands/sequence.c            |  2 +-
src/backend/commands/subscriptioncmds.c    |  2 +-
src/backend/commands/tablecmds.c           |  6 +++---
src/backend/commands/tablespace.c          |  2 +-
src/backend/commands/trigger.c             |  2 +-
src/backend/commands/tsearchcmds.c         | 14 +++++++-------
src/backend/commands/typecmds.c            |  2 +-
src/backend/commands/user.c                |  8 ++++----
src/backend/replication/logical/origin.c   |  2 +-
src/backend/rewrite/rewriteRemove.c        |  2 +-
src/backend/storage/large_object/inv_api.c |  4 ++--
src/include/catalog/indexing.h             |  1 +
40 files changed, 101 insertions(+), 83 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1cZ2Di-0003P8-FR@gemulon.postgresql.org>
Permalink:  ../E1cZ2Di-0003P8-FR@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1cZ2Di-0003P8-FR@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: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Provide CatalogTupleDelete() as a wrapper around simple_heap_del
  In-Reply-To: <E1cZ2Di-0003P8-FR@gemulon.postgresql.org>
  References: <E1cZ2Di-0003P8-FR@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