Re: [PATCH] doc: Document that invalid indexes are skipped during ATTACH PARTITION

Поиск
Список
Период
Сортировка
Искать

Re: [PATCH] doc: Document that invalid indexes are skipped during ATTACH PARTITION

От:
Mohamed ALi <moali.pg@gmail.com>
Дата:
Вложения:
Hi Sami,

Thanks for the review. I agree, rewriting the existing sentence reads
much better than appending a separate one.

I've adopted your suggestion in v2, with one addition: a sentence
noting that invalid indexes remain on the partition and
should be dropped manually if no longer needed.
I think this helps make it clear that the user is responsible for
cleaning those up.

The full paragraph now reads:

For each index in the target table, if a valid equivalent
index already exists in the partition, it will be attached
to the target table's index, as if ALTER INDEX ATTACH
PARTITION had been executed; otherwise, a corresponding
one will be created.  Any invalid indexes on the partition remain
unchanged and should be dropped manually if they are no longer
needed.

v2 patch attached.

-- 
Mohamed Ali

Re: [PATCH] doc: Document that invalid indexes are skipped during ATTACH PARTITION

От:
Michael Paquier <michael@paquier.xyz>
Дата:
Вложения:
On Tue, Jun 02, 2026 at 10:58:23PM -0700, Mohamed ALi wrote:
> The full paragraph now reads:
> 
> For each index in the target table, if a valid equivalent
> index already exists in the partition, it will be attached
> to the target table's index, as if ALTER INDEX ATTACH
> PARTITION had been executed; otherwise, a corresponding
> one will be created.  Any invalid indexes on the partition remain
> unchanged and should be dropped manually if they are no longer
> needed.

Hmm.  How about?
For each index in the target table, if a valid equivalent index
already exists in the partition, it will be attached to the target
table's index, as if ALTER INDEX ATTACH PARTITION had been executed;
otherwise, a new corresponding index will be created.  Invalid indexes
on the partition are skipped.

In short, I am not sure that there is a need to mention the drop;
that's up to the user to decide what to do and that's a DROP INDEX
thing, not an ALTER thing.
--
Michael
FAQ