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

From David Rowley
Subject Re: Proposal to Enable/Disable Index using ALTER INDEX
Date
Msg-id CAApHDvrArTnFa21xyKXeTK-+HFCqDBtYLrWc7BE+ArU3FSuuPA@mail.gmail.com
Whole thread Raw
In response to Re: Proposal to Enable/Disable Index using ALTER INDEX  (Michael Banck <mbanck@gmx.net>)
Responses Re: Proposal to Enable/Disable Index using ALTER INDEX
List pgsql-hackers
On Tue, 10 Sept 2024 at 22:46, Michael Banck <mbanck@gmx.net> wrote:
> How about the indislive flag instead? I haven't looked at the code, but
> from the documentation ("If false, the index is in process of being
> dropped, and
> should be ignored for all purposes") it sounds like we made be able to
> piggy-back on that instead?

Doing that could cause an UPDATE which would ordinarily not be
eligible for a HOT-update to become a HOT-update. That would cause
issues if the index is enabled again as the index wouldn't have been
updated during the UPDATE.

I don't see the big deal with adding a new flag. There's even a free
padding byte to put this flag in after indisreplident, so we don't
have to worry about using more memory.

David



pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: [PATCH] Fix small overread during SASLprep
Next
From: torikoshia
Date:
Subject: Re: ANALYZE ONLY