pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Kempter <cs_dba@consistentstate.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-admin@postgresql.org
Subject: Re: dropping constraints
Date: Wed, 1 Sep 2010 21:24:30 -0600
Message-ID: <201009012124.30922.cs_dba@consistentstate.com> (raw)
In-Reply-To: <12512.1283397635@sss.pgh.pa.us>
References: <201009012058.05142.cs_dba@consistentstate.com>
	<12512.1283397635@sss.pgh.pa.us>

]
> Kevin Kempter <cs_dba@consistentstate.com> writes:
> > we have a few not null constraints we want to drop on very large tables.
> > Unfortunately the drop's are taking hours. Is there a way to drop a not
> > null constraint via the system catalogs?
>
> Dropping a NOT NULL constraint is a trivial operation.  The problem is
> probably that you are blocked waiting to get a lock on the table.
> Look for idle-in-transaction sessions that are holding locks on the
> target table.
>
> 			regards, tom lane

thanks



view thread (3+ messages)

Message-ID: <201009012124.30922.cs_dba@consistentstate.com>
Permalink:  ../201009012124.30922.cs_dba@consistentstate.com/
Also on:    postgresql.org/message-id/201009012124.30922.cs_dba@consistentstate.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-admin@postgresql.org
  Cc: cs_dba@consistentstate.com, tgl@sss.pgh.pa.us
  Subject: Re: dropping constraints
  In-Reply-To: <201009012124.30922.cs_dba@consistentstate.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