列出Postgresql数据库中的所有UNLOGGED表

时间:2012-03-14 12:55:35

标签: postgresql postgresql-9.1

从版本9.1开始,PostgreSQL支持创建不使用WAL的UNLOGGED表,并在任何数据库恢复期间被截断。请参阅文档: create unlogged table

PostgreSQL在哪里存储信息,关系是否是UNLOGGED?我正在寻找一个查询列出所有UNLOGGED的关系。

提前致谢

2 个答案:

答案 0 :(得分:9)

它是pg_class目录的relpersistence列:

http://www.postgresql.org/docs/9.1/static/catalog-pg-class.html

答案 1 :(得分:1)

https://www.postgresql.org/docs/current/catalog-pg-class.html

select relname, relowner from pg_class where relpersistence='u';
相关问题