How to find what tablespace a table/index is in on PostgreSQL?
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'];