diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2008-12-30 03:59:19 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2008-12-30 03:59:19 +0000 |
commit | 1b1b0ac8d027044726fc09090a6112eb63c12ac4 (patch) | |
tree | 0a8b741c69eaef6c65cf102afcdef8bb65c2cd37 /src | |
parent | 2c38b8c71559f6c5c45de39f890357fc99d49d11 (diff) | |
download | postgresql-1b1b0ac8d027044726fc09090a6112eb63c12ac4.tar.gz postgresql-1b1b0ac8d027044726fc09090a6112eb63c12ac4.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/utils/cache/relcache.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 0ab9f8de110..f35eb872859 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.278 2008/12/03 13:05:22 heikki Exp $ + * $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.279 2008/12/30 03:59:19 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -777,6 +777,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)) |