Re: dropping constraints

From: Kevin Kempter <cs_dba(at)consistentstate(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: dropping constraints
Date: 2010-09-02 03:24:30
Message-ID: 201009012124.30922.cs_dba@consistentstate.com
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

thanks

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Willy-Bas Loos 2010-09-02 08:15:12 Re: Query Optimization with Partitioned Tables
Previous Message Tom Lane 2010-09-02 03:20:35 Re: dropping constraints