Re: CLUSTER patch

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)atentus(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: CLUSTER patch
Date: 2002-07-16 04:55:23
Message-ID: 200207160455.g6G4tNs07491@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> >> Anyway, there's still a big problem with this patch: the pg_depend
> >> information gets messed up after CLUSTER, so a clustered table cannot be
> >> dropped. I don't know why is this.
>
> > I actually backed out Tom's recent change to cluster.c (attached),
> > applied your patch, then manually applied Tom's patch to cluster.c so I
> > had a working version of your patch with the new dependencies. Seemed
> > to work fine.
>
> The changes I made to cluster.c may or may not be correct in the
> context of a redone CLUSTER implementation; it'll need to be looked at.

Tom, you are probably right because the table being dropped doesn't have
anything associated with it, except that it has the same tuple
descriptor as the base table. Wonder if that is going to create things
like defaults that need to be cascade deleted:

OIDNewHeap = heap_create_with_catalog(NewName,
RelationGetNamespace(OldHeap),
tupdesc,
OldHeap->rd_rel->relkind,
OldHeap->rd_rel->relisshared,
OldHeap->rd_rel->relhasoids,
allowSystemTableMods);

If you can tell me which drop type is correct, I can apply the cluster patch.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2002-07-16 05:14:38 Re: Between Node
Previous Message Tom Lane 2002-07-16 04:01:41 Re: [PATCHES] CLUSTER not lose indexes