mirror of
https://github.com/postgres/postgres.git
synced 2025-07-17 06:41:09 +03:00
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.
This commit is contained in:
@ -238,14 +238,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.
|
||||
|
Reference in New Issue
Block a user