Add support for REINDEX in event triggers
Michael Paquier <michael@paquier.xyz>
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
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/event-trigger.sgml | modified | +8 −0 |
| src/backend/catalog/index.c | modified | +20 −4 |
| src/backend/commands/cluster.c | modified | +1 −1 |
| src/backend/commands/indexcmds.c | modified | +48 −29 |
| src/backend/commands/tablecmds.c | modified | +1 −1 |
| src/backend/tcop/utility.c | modified | +7 −4 |
| src/include/catalog/index.h | modified | +5 −3 |
| src/include/tcop/cmdtaglist.h | modified | +1 −1 |
| src/test/regress/expected/event_trigger.out | modified | +52 −0 |
| src/test/regress/sql/event_trigger.sql | modified | +45 −0 |
Documentation touched
Discussion
- PATCH: Add REINDEX tag to event triggers 27 messages · 2023-07-21 → 2023-12-06