Re: Sequences not moved to new tablespace

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Sequences not moved to new tablespace
Дата
Msg-id 54EB838F.20301@aklaver.com
обсуждение исходный текст
Ответ на Sequences not moved to new tablespace  (Guillaume Drolet <droletguillaume@gmail.com>)
Список pgsql-general
On 02/23/2015 10:08 AM, Guillaume Drolet wrote:
> Hello,
>
> I moved all my tables and indexes from one tablespace to pg_default using
>
> ALTER TABLE ... SET TABLESPACE pg_default;
> ALTER INDEX ... SET TABLESPACE pg_default;
>
> Some 2500 files were moved to pg_default but 461 files remain in the
> tablespace and so I cannot drop it.

Are the file sizes > 0?

>
> When I query, for example:
>
> SELECT oid, relname, relkind FROM pg_catalog.pg_class
> WHERE oid IN (943602, 2650968, 2650971);
>
> I see that most of these files are sequences. Why didn't they get moved
> and how can I move them to pg_default (and all other remaining files) so
> that I can drop the tablespace?

Been doing some testing. Sequences are tied to schemas as far I can see.
I created a table in a non-default tablespace with a sequence. The table
got created in the tablespace, but the sequence remained in the default
tablespace.

So I am trying to figure out how your sequences in another tablespace?

If you do something like this:

postgres@test=# select * from pg_class where relname='t_id_seq';


what do you see for reltablespace ?

>
> Thanks!
>


--
Adrian Klaver
adrian.klaver@aklaver.com


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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Sequences not moved to new tablespace
Следующее
От: George Woodring
Дата:
Сообщение: Re: SQL solution for my JDBC timezone issue