Re: Reducing some DDL Locks to ShareLock
От | Simon Riggs |
---|---|
Тема | Re: Reducing some DDL Locks to ShareLock |
Дата | |
Msg-id | 1226354882.27904.310.camel@ebony.2ndQuadrant обсуждение исходный текст |
Ответ на | Re: Reducing some DDL Locks to ShareLock (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Reducing some DDL Locks to ShareLock
|
Список | pgsql-hackers |
On Sun, 2008-11-09 at 20:18 -0500, Tom Lane wrote: > Simon Riggs <simon@2ndQuadrant.com> writes: > > Will think some more and report back. > > If you want to do some more development, here's the portion of the > patch as yet unapplied --- will save you extracting it for yourself. Thanks. More thought tells me that we should have a LockRelationForCatalogUpdate() that uses nearly the same design pattern as LockRelationForExtension(). There is no lockmode since we always take the lock in exclusive mode. Callers would grab the catalog update lock, re-read catalog, assemble the new tuple, make in-place update and release lock. Lock is non-transactional and exists only to serialise catalog updates from concurrent DDL operations. We then have the rule that all callers of heap_inplace_update() must already hold the catalog update lock. You like? -- Simon Riggs www.2ndQuadrant.comPostgreSQL Training, Services and Support
В списке pgsql-hackers по дате отправления: