From: Tom Lane Date: Tue, 30 Dec 2008 03:59:28 +0000 (+0000) Subject: Fix oversight in ALTER TABLE ENABLE/DISABLE RULE patch: the new enabled X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=1280bb93ccb55c894c3e06836b04e7915e4e3603;p=users%2Fbernd%2Fpostgres.git Fix oversight in ALTER TABLE ENABLE/DISABLE RULE patch: the new enabled field needs to be included in equalRuleLocks() comparisons, else updates will fail to propagate into relcache entries when they have positive reference count (ie someone is using the relcache entry). Per report from Alex Hunsaker. --- diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 3353d6605d..32b149d693 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -770,6 +770,8 @@ equalRuleLocks(RuleLock *rlock1, RuleLock *rlock2) return false; if (rule1->attrno != rule2->attrno) return false; + if (rule1->enabled != rule2->enabled) + return false; if (rule1->isInstead != rule2->isInstead) return false; if (!equal(rule1->qual, rule2->qual))