Re: [PATCHES] ALTER TABLE ... SET TABLESPACE

Поиск
Список
Период
Сортировка
От Gavin Sherry
Тема Re: [PATCHES] ALTER TABLE ... SET TABLESPACE
Дата
Msg-id Pine.LNX.4.58.0406211120320.24854@linuxworld.com.au
обсуждение исходный текст
Ответ на Re: [PATCHES] ALTER TABLE ... SET TABLESPACE  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PATCHES] ALTER TABLE ... SET TABLESPACE  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sun, 20 Jun 2004, Tom Lane wrote:

> Gavin Sherry <swm@linuxworld.com.au> writes:
> > On Mon, 21 Jun 2004, Tatsuo Ishii wrote:
> >> Also I think we need to enhance ALTER INDEX to assign new table spaces
> >> for indexes. Assigning different tables spaces for tables and indexes
> >> are essential to gain more I/O speed IMO.
>
> > I thought about this. ALTER INDEX doesn't exist yet and I figured that,
> > unlike the case of tables, its easy to drop and recreate indexes in new
> > tablespaces.
>
> The precedents we already have (ALTER OWNER, RENAME, SET STATISTICS)
> are that ALTER TABLE applies to any relation type for which it makes
> sense.  So I'd expect ALTER TABLE SET TABLESPACE to just work on
> indexes, not that we'd go and invent an ALTER INDEX ... command.

Yes, of course.

>
> Given that you implement the data transfer as a straight block-by-block
> copy and not some kind of tuple-at-a-time thing, I would think that
> it would be trivial to consider them the same case from an
> implementation point of view, too.

But I did implement it as a tuple at a time thing. I reused the code from
rebuild_relation()...

What did you have in mind?

Gavin


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCHES] ALTER TABLE ... SET TABLESPACE
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCHES] ALTER TABLE ... SET TABLESPACE