From 2dbbda02e7e688311e161a912a0ce00cde9bb6fc Mon Sep 17 00:00:00 2001 From: Simon Riggs Date: Wed, 28 Jul 2010 05:22:24 +0000 Subject: 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. --- src/backend/commands/typecmds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/commands/typecmds.c') diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c index 5d94445910c..19d61a72568 100644 --- a/src/backend/commands/typecmds.c +++ b/src/backend/commands/typecmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/typecmds.c,v 1.149 2010/07/25 23:21:21 rhaas Exp $ + * $PostgreSQL: pgsql/src/backend/commands/typecmds.c,v 1.150 2010/07/28 05:22:24 sriggs Exp $ * * DESCRIPTION * The "DefineFoo" routines take the parse tree and pick out the @@ -2638,7 +2638,7 @@ AlterTypeOwner(List *names, Oid newOwnerId) * AlterTypeOwnerInternal to take care of the pg_type entry(s). */ if (typTup->typtype == TYPTYPE_COMPOSITE) - ATExecChangeOwner(typTup->typrelid, newOwnerId, true); + ATExecChangeOwner(typTup->typrelid, newOwnerId, true, AccessExclusiveLock); else { /* -- cgit v1.2.3