Fix oversight in ALTER TABLE ENABLE/DISABLE RULE patch: the new enabled
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 30 Dec 2008 03:59:28 +0000 (03:59 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 30 Dec 2008 03:59:28 +0000 (03:59 +0000)
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.

src/backend/utils/cache/relcache.c

index 3353d6605d7bc82414797037077d37e14db9ad95..32b149d6935516cc700de9bf24e77e3534d7c6db 100644 (file)
@@ -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))