PostgreSQL 修改系统配置

PostgreSQL About 783 words

查看数据库配置文件

show config_file;

输出

postgres=# show config_file;
                                 config_file
------------------------------------------------------------------------------
 /Users/fendoudebb/Library/Application Support/Postgres/var-15/postgresql.conf
(1 row)

查看 hba 连接认证文件

show hba_file;

输出

postgres=# show hba_file;
                                hba_file
--------------------------------------------------------------------------
 /Users/fendoudebb/Library/Application Support/Postgres/var-15/pg_hba.conf
(1 row)

查看全部配置

show all;

或者

select * from pg_settings;

postgresql.auto.conf

使用alter system命令将修改postgresql.auto.conf文件。这样可以很好的保护postgresql.conf文件。

如果使用很多alter system命令后不清楚默认配置了,只需要删除postgresql.auto.conf再重新加载即可。

reset 恢复默认值

重置指定配置

reset work_mem;

重置所有配置

reset all;
Views: 292 · Posted: 2023-10-23

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh