Re: [PATCH] Proposal to Enable/Disable Index using ALTER INDEX

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Robert Treat <rob@xzilla.net>
Cc: Shayon Mukherjee <shayonj@gmail.com>, David Rowley <dgrowleyml@gmail.com>, Gurjeet Singh <gurjeet@singh.im>, Nathan Bossart <nathandbossart@gmail.com>, Sami Imseih <samimseih@gmail.com>, jian he <jian.universality@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2025-09-09T00:10:46Z
Lists: pgsql-hackers
On Mon, Sep 08, 2025 at 09:37:39AM -0400, Robert Treat wrote:
> Thanks for your work on this. For those who may not be aware, Sami did
> implement a version of this in pg_hint_plan{1}, so that is helpful. I think
> it may be worth revisiting this in core, but perhaps once we seen this new
> implementation in action for a bit. (?)
> 
> {1}
> https://github.com/ossc-db/pg_hint_plan/commit/d2cfd2f2c1fd18f55123b12c2250a384ccfaefaf

A side note on this one: it may make sense to implement regexp
handling in this new hint, where all the indexes matching the regexp
become ignored by the planner.  We have not done that because we
wanted to see the impact of the initial feature first.  I don't think
that this would increase the complexity footprint by a lot.
--
Michael