微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

默认角色无法登录 Postgres 10

如何解决默认角色无法登录 Postgres 10

我正在配置 postgres 数据库,我看到认角色 pg_monitor、pg_read_all_settings、pg_read_all_stats、pg_signal_backend 和 pg_stat_scan_tables 都无法登录。我不确定第一步是什么。这是 \l 和 \du 的输出

postgres=# \l
                                   List of databases
   Name    |  Owner   | Encoding |   Collate   |    Ctype    |    Access privileges
-----------+----------+----------+-------------+-------------+-------------------------
 confdb02  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres           +
           |          |          |             |             | postgres=CTc/postgres  +
           |          |          |             |             | confluence=CTc/postgres
 postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres            +
           |          |          |             |             | postgres=CTc/postgres
 template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres            +
           |          |          |             |             | postgres=CTc/postgres
(4 rows)

postgres=# \du
                                                            List of roles
      Role name       |                   Attributes                   |                          Member of
----------------------+------------------------------------------------+--------------------------------------------------------------
 confluence           | Superuser,Create role,Create DB              | {}
 pg_monitor           | Cannot login                                   | {pg_read_all_settings,pg_read_all_stats,pg_stat_scan_tables}
 pg_read_all_settings | Cannot login                                   | {}
 pg_read_all_stats    | Cannot login                                   | {}
 pg_signal_backend    | Cannot login                                   | {}
 pg_stat_scan_tables  | Cannot login                                   | {}
 postgres             | Superuser,Create DB,Replication | {}

Thanks!

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。