Reduce lock levels of CREATE TRIGGER and some ALTER TABLE, CREATE RULE actions.
Simon Riggs <simon@2ndQuadrant.com>
Reduce lock levels of CREATE TRIGGER and some ALTER TABLE, CREATE RULE actions. Avoid hard-coding lockmode used for many altering DDL commands, allowing easier future changes of lock levels. Implementation of initial analysis on DDL sub-commands, so that many lock levels are now at ShareUpdateExclusiveLock or ShareRowExclusiveLock, allowing certain DDL not to block reads/writes. First of number of planned changes in this area; additional docs required when full project complete.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/mvcc.sgml | modified | +10 −8 |
| src/backend/catalog/pg_shdepend.c | modified | +2 −2 |
| src/backend/commands/alter.c | modified | +2 −2 |
| src/backend/commands/tablecmds.c | modified | +363 −196 |
| src/backend/commands/trigger.c | modified | +15 −5 |
| src/backend/commands/typecmds.c | modified | +2 −2 |
| src/backend/parser/parse_utilcmd.c | modified | +16 −7 |
| src/backend/rewrite/rewriteDefine.c | modified | +8 −5 |
| src/backend/utils/adt/ri_triggers.c | modified | +2 −2 |
| src/include/commands/tablecmds.h | modified | +6 −3 |