重庆思庄Oracle、Redhat认证学习论坛
标题:
PG如何显示所有非默认配置信息
[打印本页]
作者:
郑全
时间:
2024-8-4 13:32
标题:
PG如何显示所有非默认配置信息
就是想看到所有非默认的参数,约等于 postgresql.conf 文件里面修改过的参数
从PG15以上版本,提供了\dconfig 这个元命令,不带任何参数,就是显示所有非默认参数:
postgres=#
\dconfig
List of non-default configuration parameters
Parameter | Value
----------------------------+----------------------------------------
TimeZone | Asia/Shanghai
application_name | psql
client_encoding | UTF8
config_file | /var/lib/pgsql/16/data/postgresql.conf
data_directory | /var/lib/pgsql/16/data
default_text_search_config | pg_catalog.english
hba_file | /var/lib/pgsql/16/data/pg_hba.conf
ident_file | /var/lib/pgsql/16/data/pg_ident.conf
lc_messages | C.UTF-8
lc_monetary | C.UTF-8
lc_numeric | C.UTF-8
lc_time | C.UTF-8
listen_addresses | *
log_directory | pg_log
log_filename | postgresql-%a.log
log_rotation_size | 0
log_timezone | Asia/Shanghai
log_truncate_on_rotation | on
logging_collector | on
unix_socket_directories | /var/lib/pgsql/16/data
(20 rows)
作者:
郑全
时间:
2024-8-4 13:34
想看某一个参数的详细信息,带 + 号即可
postgres=# \dconfig+ config_file
List of configuration parameters
Parameter | Value | Type | Context | Access privileges
-------------+----------------------------------------+--------+------------+-------------------
config_file | /var/lib/pgsql/16/data/postgresql.conf | string | postmaster |
(1 row)
postgres=#
作者:
郑全
时间:
2024-8-4 13:35
本帖最后由 郑全 于 2024-8-4 13:37 编辑
看所有非默认参数的详细信息:
postgres=# \dconfig+
List of non-default configuration parameters
Parameter | Value | Type | Context | Access privileges
----------------------------+----------------------------------------+---------+------------+-------------------
TimeZone | Asia/Shanghai | string | user |
application_name | psql | string | user |
client_encoding | UTF8 | string | user |
config_file | /var/lib/pgsql/16/data/postgresql.conf | string | postmaster |
data_directory | /var/lib/pgsql/16/data | string | postmaster |
default_text_search_config | pg_catalog.english | string | user |
hba_file | /var/lib/pgsql/16/data/pg_hba.conf | string | postmaster |
ident_file | /var/lib/pgsql/16/data/pg_ident.conf | string | postmaster |
lc_messages | C.UTF-8 | string | superuser |
lc_monetary | C.UTF-8 | string | user |
lc_numeric | C.UTF-8 | string | user |
lc_time | C.UTF-8 | string | user |
listen_addresses | * | string | postmaster |
log_directory | pg_log | string | sighup |
log_filename | postgresql-%a.log | string | sighup |
log_rotation_size | 0 | integer | sighup |
log_timezone | Asia/Shanghai | string | sighup |
log_truncate_on_rotation | on | bool | sighup |
logging_collector | on | bool | postmaster |
unix_socket_directories | /var/lib/pgsql/16/data | string | postmaster |
(20 rows)
postgres=#
欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/)
Powered by Discuz! X3.2