List of all UNLOGGED tables in Postgresql database

Since version 9.1, PostgreSQL supports the creation of UNLOGGED tables that do not use WAL and are truncated during any database restore. See Documentation:create unlogged table

Where does PostgreSQL store information about whether a relation is UNLOGGED? I am looking for a query to list all the relationships that are NOT USED.

Thank you in advance


source to share

2 answers

This is relpersistence

the pg_class catalog column:



select relname, relowner from pg_class where relpersistence='u';




All Articles