mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
Remove obsolete IndexIs* macros
Remove IndexIsValid(), IndexIsReady(), IndexIsLive() in favor of accessing the index structure directly. These macros haven't been used consistently, and the original reason of maintaining source compatibility with PostgreSQL 9.2 is gone. Discussion: https://www.postgresql.org/message-id/flat/d419147c-09d4-6196-5d9d-0234b230880a%402ndquadrant.com
This commit is contained in:
@@ -1754,7 +1754,7 @@ vacuum_rel(Oid relid, RangeVar *relation, int options, VacuumParams *params)
|
||||
* specified kind of lock on each. Return an array of Relation pointers for
|
||||
* the indexes into *Irel, and the number of indexes into *nindexes.
|
||||
*
|
||||
* We consider an index vacuumable if it is marked insertable (IndexIsReady).
|
||||
* We consider an index vacuumable if it is marked insertable (indisready).
|
||||
* If it isn't, probably a CREATE INDEX CONCURRENTLY command failed early in
|
||||
* execution, and what we have is too corrupt to be processable. We will
|
||||
* vacuum even if the index isn't indisvalid; this is important because in a
|
||||
@@ -1789,7 +1789,7 @@ vac_open_indexes(Relation relation, LOCKMODE lockmode,
|
||||
Relation indrel;
|
||||
|
||||
indrel = index_open(indexoid, lockmode);
|
||||
if (IndexIsReady(indrel->rd_index))
|
||||
if (indrel->rd_index->indisready)
|
||||
(*Irel)[i++] = indrel;
|
||||
else
|
||||
index_close(indrel, lockmode);
|
||||
|
||||
Reference in New Issue
Block a user