mirror of
https://github.com/postgres/postgres.git
synced 2025-10-25 13:17:41 +03:00
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.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/commands/tablecmds.h,v 1.46 2010/02/01 19:28:56 rhaas Exp $
|
||||
* $PostgreSQL: pgsql/src/include/commands/tablecmds.h,v 1.47 2010/07/28 05:22:24 sriggs Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -15,6 +15,7 @@
|
||||
#define TABLECMDS_H
|
||||
|
||||
#include "nodes/parsenodes.h"
|
||||
#include "storage/lock.h"
|
||||
#include "utils/relcache.h"
|
||||
|
||||
|
||||
@@ -24,12 +25,14 @@ extern void RemoveRelations(DropStmt *drop);
|
||||
|
||||
extern void AlterTable(AlterTableStmt *stmt);
|
||||
|
||||
extern void ATExecChangeOwner(Oid relationOid, Oid newOwnerId, bool recursing);
|
||||
extern LOCKMODE AlterTableGetLockLevel(List *cmds);
|
||||
|
||||
extern void ATExecChangeOwner(Oid relationOid, Oid newOwnerId, bool recursing, LOCKMODE lockmode);
|
||||
|
||||
extern void AlterTableInternal(Oid relid, List *cmds, bool recurse);
|
||||
|
||||
extern void AlterTableNamespace(RangeVar *relation, const char *newschema,
|
||||
ObjectType stmttype);
|
||||
ObjectType stmttype, LOCKMODE lockmode);
|
||||
|
||||
extern void AlterRelationNamespaceInternal(Relation classRel, Oid relOid,
|
||||
Oid oldNspOid, Oid newNspOid,
|
||||
|
||||
Reference in New Issue
Block a user