Re: [PATCH] Re: Proposal to Enable/Disable Index using ALTER INDEX - Mailing list pgsql-hackers

From Sami Imseih
Subject Re: [PATCH] Re: Proposal to Enable/Disable Index using ALTER INDEX
Date
Msg-id CAA5RZ0trz5mBRU43OOG+NVPG5vaonouHx0KtX=ivqpt+4GtHBQ@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Re: Proposal to Enable/Disable Index using ALTER INDEX  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: [PATCH] Proposal to Enable/Disable Index using ALTER INDEX
List pgsql-hackers

IMO, having this GUC to force the use of invisible indexes is quite
strange. In my view, it detracts from the guarantees that you're meant
to get from disabling indexes. What if some connection has
use_invisible_index set to true? The DBA might assume all is well
after having seen nobody complain and then drop the index. The user
might then complain.

Sure, this may occur. I can also imagine cases where an index is made
visible only for certain workloads, intentionally. But such efforts should
be coordinated by application teams and DBAs. Someone would need to modify
this GUC at the connection level, alter the database, or change the session
via application code. An ad-hoc connection enabling this GUC is unlikely to
be an issue.

I don't see how we could provide the INVISIBLE index DDL without also
providing this boolean GUC. If a user creates an index that is initially
INVISIBLE, they need a GUC to try it out before deciding to make it
visible.

It was also pointed out in the thread above that this GUC can serve as a
backstop for replicas if the DDL to make an index visible is delayed.

--

Sami


pgsql-hackers by date:

Previous
From: Alexander Borisov
Date:
Subject: Re: Improve the performance of Unicode Normalization Forms.
Next
From: Dmitry Koval
Date:
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands