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