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: Add support for REINDEX in event triggers
Date: Mon, 04 Dec 2023 00:55:33 +0000
Message-ID: <E1r9xFF-008TbG-2I@gemulon.postgresql.org> (raw)

Add support for REINDEX in event triggers

This commit adds support for REINDEX in event triggers, making this
command react for the events ddl_command_start and ddl_command_end.  The
indexes rebuilt are collected with the ReindexStmt emitted by the
caller, for the concurrent and non-concurrent paths.

Thanks to that, it is possible to know a full list of the indexes that a
single REINDEX command has worked on.

Author: Garrett Thornburg, Jian He
Reviewed-by: Jim Jones, Michael Paquier
Discussion: https://postgr.es/m/CAEEqfk5bm32G7sbhzHbES9WejD8O8DCEOaLkxoBP7HNWxjPpvg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f21848de20130146bc8039504af40bd24add54cd

Modified Files
--------------
doc/src/sgml/event-trigger.sgml             |  8 +++
src/backend/catalog/index.c                 | 24 +++++++--
src/backend/commands/cluster.c              |  2 +-
src/backend/commands/indexcmds.c            | 77 ++++++++++++++++++-----------
src/backend/commands/tablecmds.c            |  2 +-
src/backend/tcop/utility.c                  | 11 +++--
src/include/catalog/index.h                 |  8 +--
src/include/tcop/cmdtaglist.h               |  2 +-
src/test/regress/expected/event_trigger.out | 52 +++++++++++++++++++
src/test/regress/sql/event_trigger.sql      | 45 +++++++++++++++++
10 files changed, 188 insertions(+), 43 deletions(-)



Message-ID: <E1r9xFF-008TbG-2I@gemulon.postgresql.org>
Permalink:  ../E1r9xFF-008TbG-2I@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1r9xFF-008TbG-2I@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add support for REINDEX in event triggers
  In-Reply-To: <E1r9xFF-008TbG-2I@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