@@ -8107,7 +8107,7 @@ transformFkeyGetPrimaryKey(Relation pkrel, Oid *indexOid,
81078107if (!HeapTupleIsValid (indexTuple ))
81088108elog (ERROR ,"cache lookup failed for index %u" ,indexoid );
81098109indexStruct = (Form_pg_index )GETSTRUCT (indexTuple );
8110- if (indexStruct -> indisprimary && IndexIsValid ( indexStruct ) )
8110+ if (indexStruct -> indisprimary && indexStruct -> indisvalid )
81118111{
81128112/*
81138113 * Refuse to use a deferrable primary key. This is per SQL spec,
@@ -8228,7 +8228,7 @@ transformFkeyCheckAttrs(Relation pkrel,
82288228 */
82298229if (indexStruct -> indnkeyatts == numattrs &&
82308230indexStruct -> indisunique &&
8231- IndexIsValid ( indexStruct ) &&
8231+ indexStruct -> indisvalid &&
82328232heap_attisnull (indexTuple ,Anum_pg_index_indpred ,NULL )&&
82338233heap_attisnull (indexTuple ,Anum_pg_index_indexprs ,NULL ))
82348234{
@@ -12461,7 +12461,7 @@ ATExecReplicaIdentity(Relation rel, ReplicaIdentityStmt *stmt, LOCKMODE lockmode
1246112461errmsg ("cannot use partial index \"%s\" as replica identity" ,
1246212462RelationGetRelationName (indexRel ))));
1246312463/* And neither are invalid indexes. */
12464- if (!IndexIsValid ( indexRel -> rd_index ) )
12464+ if (!indexRel -> rd_index -> indisvalid )
1246512465ereport (ERROR ,
1246612466(errcode (ERRCODE_FEATURE_NOT_SUPPORTED ),
1246712467errmsg ("cannot use invalid index \"%s\" as replica identity" ,
@@ -14996,7 +14996,7 @@ validatePartitionedIndex(Relation partedIdx, Relation partedTbl)
1499614996elog (ERROR ,"cache lookup failed for index %u" ,
1499714997inhForm -> inhrelid );
1499814998indexForm = (Form_pg_index )GETSTRUCT (indTup );
14999- if (IndexIsValid ( indexForm ) )
14999+ if (indexForm -> indisvalid )
1500015000tuples += 1 ;
1500115001ReleaseSysCache (indTup );
1500215002}