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

From: Sami Imseih <samimseih(at)gmail(dot)com>
To: Gurjeet Singh <gurjeet(at)singh(dot)im>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, Shayon Mukherjee <shayonj(at)gmail(dot)com>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Re: Proposal to Enable/Disable Index using ALTER INDEX
Date: 2025-04-03 01:58:49
Message-ID: CAA5RZ0tHnxpTZVFdMvLABaR8k8GSGJg9gXBACksLkKiDFio0Jg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > + indexes. If performance degrades after making an index invisible, it can be easily
> > + be made visible using <literal>VISIBLE</literal>. Before making an index invisible, it's recommended
> > + to check <structname>pg_stat_user_indexes</structname>.<structfield>idx_scan</structfield>
> > + to identify potentially unused indexes.
>
> I feel ALTER INDEX command reference doc is not the right place for this kind of
> operational advice. Is there a better place in documentation for this kind of
> advice? Or maybe it needs to be reworded to fit the command reference style?

I agree with you.

What about we add this wording in the following section [0]? This
section discusses techniques
for experimenting with indexes. It says,
".... A good deal of experimentation is often necessary. The rest of
this section gives some tips for that:...."

A discussion about invisible indexes as one of the tools for
experimentation can be added here.
What do you think?

[0] https://www.postgresql.org/docs/current/indexes-examine.html

--
Sami Imseih
Amazon Web Services (AWS)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gurjeet Singh 2025-04-03 02:16:01 Re: [PATCH] Re: Proposal to Enable/Disable Index using ALTER INDEX
Previous Message Thomas Munro 2025-04-03 01:43:40 Re: Some read stream improvements