From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Reducing some DDL Locks to ShareLock |
Date: | 2008-11-10 22:08:02 |
Message-ID: | 1226354882.27904.310.camel@ebony.2ndQuadrant |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, 2008-11-09 at 20:18 -0500, Tom Lane wrote:
> Simon Riggs <simon(at)2ndQuadrant(dot)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.com
PostgreSQL Training, Services and Support
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2008-11-10 22:44:32 | Re: Block-level CRC checks |
Previous Message | Gregory Stark | 2008-11-10 21:53:46 | Re: Block-level CRC checks |