summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-12-30 03:59:28 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-12-30 03:59:28 +0000
commitde1b4298d89a55af5309711d6d8c47d1012790ab (patch)
tree0ec6c5e8b8b30b349429f8d2898c29cc513c11c5 /src
parentb33432a33b7b40053b7221eff7c38a5fae9ad740 (diff)
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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index 73d7d8ef1ed..3b6321112ce 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.266.2.4 2008/08/10 19:02:46 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.266.2.5 2008/12/30 03:59:28 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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))