Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Fix direct access to Relation->rd_indpred.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 18 Jul 2013 05:01:53 +0000 (01:01 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 18 Jul 2013 05:02:18 +0000 (01:02 -0400)
Should use RelationGetIndexPredicate(), since rd_indpred is just a cache
that is not computed until/unless demanded.  Per buildfarm failure on
CLOBBER_CACHE_ALWAYS animals; diagnosis and fix by Hitoshi Harada.

src/backend/commands/matview.c

index edd34ff171642251003b253b6d99ac383f0455af..46149eed4f7c63517f6a4bb51825debb4cad87f6 100644 (file)
@@ -634,7 +634,7 @@ refresh_by_match_merge(Oid matviewOid, Oid tempOid)
 
            /* Skip partial indexes. */
            indexRel = index_open(index->indexrelid, RowExclusiveLock);
-           if (indexRel->rd_indpred != NIL)
+           if (RelationGetIndexPredicate(indexRel) != NIL)
            {
                index_close(indexRel, NoLock);
                ReleaseSysCache(indexTuple);