DROP INVALID INDEXES command - Mailing list pgsql-hackers

From Roman Khapov
Subject DROP INVALID INDEXES command
Date
Msg-id 60D96A6C-56BD-4FAC-BB34-B85443298877@yandex-team.ru
Whole thread
Responses Re: DROP INVALID INDEXES command
List pgsql-hackers
Hi hackers!

Recently Kirill and I have faced several problems with
pg_repack, that resulted in list of invalid indexes on our installations,
and that required us to remove them ourselves.

We thought that it might be useful to have a command in PG, that
removes invalid indexes on specified table automatically, to reduce
the chances of any human-related mistakes. So we implemented a new
command which usage looks like:

postgres=# drop invalid indexes on table sas;
NOTICE: dropping index "idx2"
NOTICE: dropping index "idx5"
DROP INVALID INDEXES
postgres=#

We would like to know if this feature would be acceptable
for upstream inclusion.
POC patch attached, any feedback on the design and implementation is welcome :)

--
Best regards,
Roman Khapov


Attachment

pgsql-hackers by date:

Previous
From: Christoph Berg
Date:
Subject: Re: [PATCH] Document wal_compression=on
Next
From: Pavel Borisov
Date:
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands