Re: Re: Allow replacement of bloated primary key indexes without foreign key rebuilds

From: Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PGSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: Allow replacement of bloated primary key indexes without foreign key rebuilds
Date: 2012-07-12 23:18:15
Message-ID: CABwTF4WYVdERR+Mrra-tPESDk7=Oi3v7mKFLWSLdOV653Jt+VA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 10, 2012 at 11:11 AM, Greg Stark <stark(at)mit(dot)edu> wrote:

> On Tue, Jul 10, 2012 at 3:44 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> The problem you describe is one of constraints and dependencies and
> >> not one of indexes. It seems what you really want is a way to alter
> >> foreign key dependencies to depend on a new index. Either an explicit
> >> command that lets you set the new dependency or what seems even better
> >> would be to have DROP INDEX check any dependent objects to see if
> >> there's another index that can satisfy them and change their
> >> dependency.
> >
> > Either of these have exactly the same issue, namely their correctness
> > depends on determining if two indexes have identical properties.
>
> This doesn't sound right to me. In these cases all it would have to
> know about is the same set of properties that CREATE CONSTRAINT looks
> for to find a satisfactory index to depend on.
>

I like the DROP index idea, but the silent side-effect may not make people
happy. Can you give me a pointer to relevant code.

--
Gurjeet Singh
EnterpriseDB Corporation
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Harold A. Giménez 2012-07-12 23:21:13 Re: DELETE vs TRUNCATE explanation
Previous Message Gurjeet Singh 2012-07-12 23:08:36 Re: Re: Allow replacement of bloated primary key indexes without foreign key rebuilds