Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> Requiring a scan of all indexes during pg_upgrade might increase the
> upgrade time prohibitively for some sites, so I don't think that's a
> good solution.
Perhaps VACUUM could be taught to clean up invalid entries? That
wouldn't help Andrey's unstated goal of being able to re-use the bits
for some other purpose in v12, but it might be practical to re-use
them sometime sooner than v17.
regards, tom lane