Re: PATCH: Add REINDEX tag to event triggers
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: jian he <jian.universality@gmail.com>
Cc: Ajin Cherian <itsajin@gmail.com>, Jim Jones <jim.jones@uni-muenster.de>, Garrett Thornburg <film42@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2023-12-04T01:04:52Z
Lists: pgsql-hackers
On Tue, Nov 28, 2023 at 12:28:50AM +0800, jian he wrote: > On Mon, Nov 27, 2023 at 6:58 PM Ajin Cherian <itsajin@gmail.com> wrote: >> Ajin Cherian Dammit. I've just noticed that I missed mentioning you in the commit log as a reviewer. Sorry about that. > The above 2 suggestions are good, now the code is more neat. Right, the extra bits for the default case of standard_ProcessUtility() was not necessary, because we don't need to apply any object-level checks to see as we just collect a list of indexes. Anyway, I've been working on the patch for the last few days, and applied it after tweaking a bit its style, code and comments. Mainly, I did not see a need for reindex_event_trigger_collect() as wrapper for EventTriggerCollectSimpleCommand() as it is only used in two code paths across two files. I have come back to the regression tests, and trimmed them down to a minimum as event_trigger.sql cannot be run in parallel so this eats in run time, concluding that knowing the list of indexes rebuilt is also something that we track with relfilenode change tracking in the other test suites (including the SCHEMA, toast and partition cases), so doing that again had limited impact. One thing that I have been unable to conclude is if we should change GetCommandLogLevel() for ReindexStmt. I agree that there's a good argument for it, but I am going to raise a different thread about that to raise awareness, and this does not prevent the feature to work (even if it feels inconsistent with pg_event_trigger_ddl_commands()). -- Michael
Commits
-
Fix assertion failure with REINDEX and event triggers
- c426f7c2b36a 17.0 landed
-
Add support for REINDEX in event triggers
- f21848de2013 17.0 landed
-
Doc: Improve documentation for creating custom scan paths.
- 7ef5f5fb3240 17.0 cited
-
Add const decorations
- 11af63fb48d2 17.0 cited