8.2 Postgres Administration - Move and Drop Tablespaces

preview_player
Показать описание
Move and Drop Tablespaces

Postgres Administration - Tablespace

#check existing tablespace
select * from pg_tablespace;

#create tablespace
create tablespace rpt location '/opt/rpt';

#create table in non default tablespace
create table reporting (id int) tablespace rpt;

#check tablespace of a table
select * from pg_tables where tablename='tablename';

#move table to different tablespace
alter table actor set tablespace rpt;

#check table filepath
select * from pg_relation_filepath('actor');
Рекомендации по теме