Pg_tablespace
Query PostgreSQL Tablespace Info with pg_tablespace
Jul 3, 2026 / · 8 min read · postgresql database administration sql queries tablespaces pg_tablespace storage catalogs postgres dba ·Query PostgreSQL Tablespace Info with pg_tablespace What tablespaces exist in this cluster, who owns each one, and where do their files actually live on disk? pg_tablespace answers all three: it holds one row per tablespace with the owner OID, access control list, storage options, and — via pg_tablespace_location() — …
Read MoreIdentify Large PostgreSQL Indexes for Optimization
Mar 17, 2024 / · 9 min read · indexes storage optimization performance pg_index pg_class pg_namespace pg_tablespace pg_stat_user_indexes ·Find the Largest PostgreSQL Indexes by Size Which indexes are taking up the most disk in this database? pg_index joined to pg_class answers that in one query: every index with its table, schema, tablespace, size, and the command that would recreate it, sorted with the biggest first. It is the inventory step before any …
Read More