【问题标题】:List all UNLOGGED tables in Postgresql database列出 Postgresql 数据库中的所有 UNLOGGED 表
【发布时间】:2012-03-14 12:55:34
【问题描述】:

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

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

提前致谢

【问题讨论】:

    标签: postgresql postgresql-9.1


    【解决方案1】:

    是pg_class目录的relpersistence列:

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

    【讨论】:

      【解决方案2】:

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

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

      【讨论】:

        猜你喜欢
        • 2022-08-16
        • 1970-01-01
        • 1970-01-01
        • 2016-01-15
        • 2019-05-04
        • 1970-01-01
        • 2011-01-17
        • 1970-01-01
        • 2011-10-10
        相关资源
        最近更新 更多