Re: dropping constraints

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kevin Kempter <cs_dba(at)consistentstate(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: dropping constraints
Date: 2010-09-02 03:20:35
Message-ID: 12512.1283397635@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Kevin Kempter <cs_dba(at)consistentstate(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Kevin Kempter 2010-09-02 03:24:30 Re: dropping constraints
Previous Message Kevin Kempter 2010-09-02 02:58:05 dropping constraints