Re: PATCH: Add REINDEX tag to event triggers

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: jian he <jian.universality@gmail.com>, 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-06T23:32:45Z
Lists: pgsql-hackers
On Wed, Dec 06, 2023 at 10:00:01AM +0300, Alexander Lakhin wrote:
> I agree with it. I had worried a bit about ReindexRelationConcurrently()
> becoming twofold for callers (it can leave the snapshot or pop it), but I
> couldn't find a way to hide this twofoldness inside without adding more
> complexity. On the other hand, ReindexRelationConcurrently() now satisfies
> EnsurePortalSnapshotExists() in all cases.

Thanks, applied that with a few more tests, covering a bit more than
the code path you've reported with a failure.

I was wondering if this should be backpatched, actually, but could not
make a case for it as we've never needed a snapshot after a reindex
until now, AFAIK.
--
Michael

Commits

  1. Fix assertion failure with REINDEX and event triggers

  2. Add support for REINDEX in event triggers

  3. Doc: Improve documentation for creating custom scan paths.

  4. Add const decorations