Re: CLUSTER patch

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: CLUSTER patch
Дата
Msg-id 200207160455.g6G4tNs07491@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: CLUSTER patch  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.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@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

В списке pgsql-patches по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: SQL99 doc update
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Between Node