The pgx_tablespaces system view displays information about whether each tablespace has been encrypted, and about the encryption algorithm. Refer to "D.1 pgx_tablespaces" for information on strings.
You can discover which tablespaces have been encrypted by executing the following SQL statements.
However, when considering continued compatibility of applications, do not reference system catalogs (pg_tablespace) directly in SQL statements.
SELECT spcname, spcencalgo FROM pg_tablespace ts, pgx_tablespaces tsx WHERE ts.oid = tsx.spctablespace;
Example
postgres=# SELECT spcname, spcencalgo FROM pg_tablespace ts, pgx_tablespaces tsx WHERE ts.oid = tsx.spctablespace; spcname | spcencalgo -------------------+------------ pg_default | none pg_global | none secure_tablespace | AES256 (3 rows)
See
Refer to "Notes on Application Compatibility" in the Application Development Guide for information on how to maintain application compatibility.