From: Tom Lane Date: Thu, 18 Jul 2013 05:01:53 +0000 (-0400) Subject: Fix direct access to Relation->rd_indpred. X-Git-Tag: REL9_4_BETA1~1307 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=405a468b02dd80a069b95c4eb9838cb6a562eddd;p=postgresql Fix direct access to Relation->rd_indpred. 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. --- diff --git a/src/backend/commands/matview.c b/src/backend/commands/matview.c index edd34ff171..46149eed4f 100644 --- a/src/backend/commands/matview.c +++ b/src/backend/commands/matview.c @@ -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);