How do I find out what tablespace a table (or index) is in with PostgreSQL (9.3)?


1 Answer 1


For example, you have a table example_table (optionally in more than one schema):

SELECT tablespace 
FROM pg_tables 
WHERE tablename = 'example_table' [AND schemaname = 'your_schema'];

The same thing for the index example_index:

SELECT tablespace 
FROM pg_indexes 
WHERE indexname = 'example_index' [AND schemaname = 'your_schema'];

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.