PostgreSQL Configuration Files --PostgreSQ配置文件

Three main configuration files control basic operations of a PostgreSQL server instance.

These files are all located in the default PostgreSQL data folder. You can edit them

using your text editor of choice, or using the admin pack that comes with pgAdmin.

  • postgresql.conf controls general settings, such as how much memory to allocate,

    default storage location for new databases, which IPs PostgreSQL listens on, where

    logs are stored, and so forth.

  • pg_hba.conf controls security. It manages access to the server, dictating which users

    can login into which databases, which IPs or groups of IPs are permitted to connect

    and the authentication scheme expected.

  • pg_ident.conf is the mapping file that maps an authenticated OS login to a Post-

    greSQL user. This file is used less often, but allows you to map a server account to

    a PostgreSQL account. For example, people sometimes map the OS root account

    to the postgre’s super user account. Each authentication line in pg_hba.conf can

    use a different pg_ident.conf file.


If you are ever unsure where these files are located,

run the Example 2-1 query as a super user while connected to any of your databases.

select * from pg_settings

where category = 'File Locations'

"config_file";"/var/lib/pgsql/data/postgresql.conf"

"data_directory";"/var/lib/pgsql/data"

"external_pid_file";""

"hba_file";"/var/lib/pgsql/data/pg_hba.conf"

"ident_file";"/var/lib/pgsql/data/pg_ident.conf"



也可以用linux文件查找命令查找:

[root@localhost ~]# find / -name postgresql.conf

/usr/lib/tmpfiles.d/postgresql.conf

/var/lib/pgsql/data/postgresql.conf

或者:

[root@localhost ~]# locate postgresql.conf

/usr/lib/tmpfiles.d/postgresql.conf

/usr/pgsql-9.4/share/postgresql.conf.sample

/usr/share/pgsql/postgresql.conf.sample

/var/lib/pgsql/data/postgresql.conf


转载于:https://my.oschina.net/doctor2014/blog/390196

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值