pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bryce Nesbitt <bryce2@obviously.com>
To: pgsql-sql@postgresql.org
Subject: Re: AccessExclusiveLock on CREATE TABLE REFERENCES deadlocks (formatted better)
Date: Tue, 22 Sep 2009 17:10:18 -0700
Message-ID: <4AB9676A.6070301@obviously.com> (raw)
In-Reply-To: <13526.1253640939@sss.pgh.pa.us>
References: <4AB90198.2010109@obviously.com>
	<13526.1253640939@sss.pgh.pa.us>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
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">&lt;bryce2@obviously.com&gt;</a> writes:
  </pre>
  <blockquote type="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 long running access is read-only.&nbsp; We have a poorly
designed table that several postgres consultants have burned out on
trying to fix.<br>
<br>
Most notably there are also zillions of short read-only references that
presently block while the create table attempts to gain the
AccessExclusiveLock. <br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -Bryce<br>
</body>
</html>



view thread (5+ messages)  latest in thread

Message-ID: <4AB9676A.6070301@obviously.com>
Permalink:  ../4AB9676A.6070301@obviously.com/
Also on:    postgresql.org/message-id/4AB9676A.6070301@obviously.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: bryce2@obviously.com
  Subject: Re: AccessExclusiveLock on CREATE TABLE REFERENCES deadlocks (formatted better)
  In-Reply-To: <4AB9676A.6070301@obviously.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox