如何查看pg_hba配置文件是否正确

点击查看代码
postgres=# select * from pg_hba_file_rules;
 line_number | type  |   database    | user_name |  address  |                 netmask                 | auth_method |   options   | error
-------------+-------+---------------+-----------+-----------+-----------------------------------------+-------------+-------------+-------
          88 | local | {all}         | {all}     |           |                                         | trust       |             |
          91 | host  | {all}         | {all}     | 127.0.0.1 | 255.255.255.255                         | trust       |             |
          92 | host  | {all}         | {all}     | 10.0.0.0  | 255.255.255.0                           | md5         |             |
          93 | host  | {all}         | {all}     | 10.0.0.0  | 255.255.255.0                           | ident       | {map=mymap} |
          95 | host  | {all}         | {all}     | ::1       | ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff | trust       |             |
          98 | local | {replication} | {all}     |           |                                         | trust       |             |
          99 | host  | {replication} | {all}     | 127.0.0.1 | 255.255.255.255                         | trust       |             |
         100 | host  | {replication} | {all}     | ::1       | ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff | trust       |             |
(8 rows)

posted @ 2025-06-27 18:36  夜说  阅读(18)  评论(0)    收藏  举报