From ec1339ea5cb591da53ad7584ffc29e120f6bf74f Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 7 Jul 2011 13:14:46 -0400 Subject: Finish disabling reduced-lock-levels-for-DDL feature. Previous patch only covered the ALTER TABLE changes, not changes in other commands; and it neglected to revert the documentation changes. --- src/backend/rewrite/rewriteDefine.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/backend/rewrite/rewriteDefine.c') diff --git a/src/backend/rewrite/rewriteDefine.c b/src/backend/rewrite/rewriteDefine.c index 52c55def155..5a4c5695946 100644 --- a/src/backend/rewrite/rewriteDefine.c +++ b/src/backend/rewrite/rewriteDefine.c @@ -240,14 +240,12 @@ DefineQueryRewrite(char *rulename, /* * If we are installing an ON SELECT rule, we had better grab * AccessExclusiveLock to ensure no SELECTs are currently running on the - * event relation. For other types of rules, it is sufficient to grab - * ShareRowExclusiveLock to lock out insert/update/delete actions and to - * ensure that we lock out current CREATE RULE statements. + * event relation. For other types of rules, it would be sufficient to + * grab ShareRowExclusiveLock to lock out insert/update/delete actions and + * to ensure that we lock out current CREATE RULE statements; but because + * of race conditions in access to catalog entries, we can't do that yet. */ - if (event_type == CMD_SELECT) - event_relation = heap_open(event_relid, AccessExclusiveLock); - else - event_relation = heap_open(event_relid, ShareRowExclusiveLock); + event_relation = heap_open(event_relid, AccessExclusiveLock); /* * Verify relation is of a type that rules can sensibly be applied to. -- cgit v1.2.3