I just noticed that AlterSchemaOwner (and others like AlterFunctionOwner -- I haven't checked anything else yet) does not release the lock on pg_namespace (resp. AlterFunctionOwner) after it's done changing it. Is there a reason for this?
I notice ATExecChangeOwner uses a different mechanism, but it still locks the relation until transaction end. -- Alvaro Herrera (<alvherre[a]alvh.no-ip.org>) "Ni aun el genio muy grande llegarÃa muy lejos si tuviera que sacarlo todo de su propio interior" (Goethe)
Index: schemacmds.c =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/backend/commands/schemacmds.c,v retrieving revision 1.33 diff -c -r1.33 schemacmds.c *** schemacmds.c 14 Jul 2005 21:46:29 -0000 1.33 --- schemacmds.c 19 Aug 2005 16:09:45 -0000 *************** *** 357,361 **** } ReleaseSysCache(tup); ! heap_close(rel, NoLock); } --- 357,361 ---- } ReleaseSysCache(tup); ! heap_close(rel, RowExclusiveLock); }
---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster