citus icon indicating copy to clipboard operation
citus copied to clipboard

create_distributed_table can't inherit tablespace

Open xieyuheng1025 opened this issue 5 years ago • 5 comments

create_distributed_table can't inherit tablespace

xieyuheng1025 avatar Apr 23 '20 07:04 xieyuheng1025

+1 Is there any way to place shards into a specified tablespace?

Green-Chan avatar Aug 15 '24 13:08 Green-Chan

After creating the shards, you can run something like the following:

SELECT *
  FROM run_command_on_shards(
    'my_distributed_table',
    $cmd$
    	ALTER TABLE %s SET TABLESPACE new_tablespace
    $cmd$
  );

hanefi avatar Aug 20 '24 13:08 hanefi

Thank you

xieyuheng1025 avatar Aug 21 '24 00:08 xieyuheng1025

Thank you @hanefi , it worked!

Green-Chan avatar Aug 21 '24 06:08 Green-Chan

Reopening this issue as I believe this is a valid feature request. Citus can manage tablespaces of shards automatically if the necessary changes are made.

hanefi avatar Aug 21 '24 08:08 hanefi