Re: PROPOSAL: Support global and local disabling of indexes

Adam Brusselback <adambrusselback@gmail.com>

From: Adam Brusselback <adambrusselback@gmail.com>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Paul Martinez <hellopfm@gmail.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2022-03-18T13:01:59Z
Lists: pgsql-hackers
Just wanted to mention that this would be a useful feature for me. Had
previously been bitten by this:
https://www.postgresql.org/message-id/flat/CAMjNa7c4pKLZe%2BZ0V49isKycnXQ6Y%3D3BO-4Gsj3QAwsd2r7Wrw%40mail.gmail.com

Ended up "solving" by putting a where clause on all my exclusion
constraints I didn't want used for most queries (WHERE 1=1). That allowed
me "disable" that index for all queries unless they explicitly have a 1=1
constant in the where clause.