Re: pgsql-server/ oc/src/sgml/ref/cluster.sgml rc/ ...

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: pgsql-server/ oc/src/sgml/ref/cluster.sgml rc/ ...
Дата
Msg-id 200208110508.g7B58K518270@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: pgsql-server/ oc/src/sgml/ref/cluster.sgml rc/ ...  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pgsql-server/ oc/src/sgml/ref/cluster.sgml rc/ ...  (Alvaro Herrera <alvherre@atentus.com>)
Список pgsql-committers
Tom Lane wrote:
> momjian@postgresql.org (Bruce Momjian - CVS) writes:
> >     Major improvement in CLUSTER which preserves table characteristics using
> >     relfilenode.
>
> This patch is still a few bricks shy of a load.  In particular,
> it completely destroys TOASTed data.
>
> regression=# create table f11 (f1 int unique, f2 text);
> NOTICE:  CREATE TABLE / UNIQUE will create implicit index 'f11_f1_key' for table 'f11'
> CREATE TABLE
> regression=# insert into f11 values(0, repeat('xyzzy', 100000));
> INSERT 691177 1
> regression=# select f1,length(f2) from f11;
>  f1 | length
> ----+--------
>   0 | 500000
> (1 row)
>
> regression=# cluster f11_f1_key on f11;
> CLUSTER
> regression=# select f1,length(f2) from f11;
> ERROR:  Relation 691181 does not exist
>
>
> As-is the patch is entirely unacceptable.  Ideally we should find a way

                     ^^^^^^^^^^^^^^^^^^^^^
> to move tuples into the new table without invoking the TOAST code at
> all, but I'm not sure what that will entail.

OK, Tom, you found a problem.  No need to make the submitter feel any
worse by adding critical language to your comments.

The basic question is should be back it out or put it on the open items
list for 7.3 and keep working on it?  Either way, it will be working for
7.3, I am sure.

Myself, I thought the toast table would come along with the heap table
during the relfilenode change, and I am not sure why it didn't.

Also, do we still need the FlushRelationBuffers() calls now that we
handle the local buffer differently?  Would clustering temp table still
require the call?

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pgsql-server/ oc/src/sgml/ref/cluster.sgml rc/ ...
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql-server/ oc/src/sgml/ref/cluster.sgml rc/ ...