Tom Lane wrote: <blockquote cite="mid:13526.1253640939@sss.pgh.pa.us" type="cite"><pre wrap="">Bryce Nesbitt <a
class="moz-txt-link-rfc2396E"href="mailto:bryce2@obviously.com"><bryce2@obviously.com></a> writes:
</pre><blockquotetype="cite"><pre wrap="">1) Why the AccessExclusiveLock on create table? </pre></blockquote><pre
wrap="">
It has to install a trigger on the referenced table. There has been
some discussion that maybe CREATE TRIGGER could take just ExclusiveLock
and not AccessExclusiveLock, but it hasn't been done yet; and I'm not
sure how much that would help you anyway. It would only help if the
referenced table (contexts) is essentially read-only to the rest of
your workload, else it'll block anyhow.</pre></blockquote> Thanks for the great info.<br /><br /> In our case all the
longrunning access is read-only. We have a poorly designed table that several postgres consultants have burned out on
tryingto fix.<br /><br /> Most notably there are also zillions of short read-only references that presently block while
thecreate table attempts to gain the AccessExclusiveLock. <br /><br /> -Bryce<br />