简体   繁体   English

macOS Big Sur 中的 postgresql.conf

[英]postgresql.conf in macOS Big Sur

I'm on a macOS Big Sur , and struggling to find the config file postgresql.conf我在macOS Big Sur上,正在努力寻找配置文件postgresql.conf

While in /Applications/Postgres.app/Contents/Versions/13 I ran this/Applications/Postgres.app/Contents/Versions/13我运行了这个

➜  13 find . -type f -name "postgresql.conf"
➜  13 
➜  13 
➜  13 pwd
/Applications/Postgres.app/Contents/Versions/13

If I go into share/postgresql/ I see a bunch of sample files, but that is not what I am looking for如果我 go 进入share/postgresql/我看到一堆示例文件,但这不是我要找的

➜  postgresql L
total 2264
drwxr-xr-x@  15 alpha  admin     480 Nov 11  2020 timezonesets
drwxr-xr-x@  63 alpha  admin    2016 Nov 11  2020 timezone
drwxr-xr-x@  28 alpha  admin     896 Nov 11  2020 tsearch_data
drwxr-xr-x@   8 alpha  admin     256 Nov 11  2020 ..
drwxr-xr-x@   3 alpha  admin      96 Nov 11  2020 contrib
drwxr-xr-x@  18 alpha  admin     576 Nov 11  2020 .
drwxr-xr-x@ 491 alpha  admin   15712 Nov 11  2020 extension
-rw-r--r--@   1 alpha  admin   54635 Nov 11  2020 system_views.sql
-rw-r--r--@   1 alpha  admin     604 Nov 11  2020 pg_service.conf.sample
-rw-r--r--@   1 alpha  admin    1636 Nov 11  2020 pg_ident.conf.sample
-rw-r--r--@   1 alpha  admin   35193 Nov 11  2020 sql_features.txt
-rw-r--r--@   1 alpha  admin   35082 Nov 11  2020 snowball_create.sql
-rw-r--r--@   1 alpha  admin     278 Nov 11  2020 psqlrc.sample
-rw-r--r--@   1 alpha  admin   27924 Nov 11  2020 postgresql.conf.sample. <<< ⭐️⭐️⭐️
-rw-r--r--@   1 alpha  admin  829316 Nov 11  2020 postgres.bki
-rw-r--r--@   1 alpha  admin    4674 Nov 11  2020 pg_hba.conf.sample
-rw-r--r--@   1 alpha  admin  109729 Nov 11  2020 information_schema.sql
-rw-r--r--@   1 alpha  admin   33239 Nov 11  2020 errcodes.txt
➜  postgresql pwd
/Applications/Postgres.app/Contents/Versions/13/share/postgresql

I tried to go back further and search there我试图进一步返回 go 并在那里搜索

find . -type f -name "postgresql.*"   


./Contents/Versions/13/share/postgresql/postgresql.conf.sample

I only found the sample file: postgresql.conf.sample我只找到了示例文件: postgresql.conf.sample

If you know, please help....如果你知道,请帮助......

Only仅有的

if I installed via brew , I will be located at如果我通过brew安装,我将位于

/usr/local/var/postgres /usr/local/var/postgres

➜  postgres L
total 104
drwxrwxr-x@  9 alpha  admin    288 Dec  2 12:21 ..
drwx------   2 alpha  admin     64 Dec  2 12:21 pg_commit_ts
drwx------   2 alpha  admin     64 Dec  2 12:21 pg_dynshmem
drwx------   2 alpha  admin     64 Dec  2 12:21 pg_notify
drwx------   2 alpha  admin     64 Dec  2 12:21 pg_serial
drwx------   2 alpha  admin     64 Dec  2 12:21 pg_snapshots
drwx------   2 alpha  admin     64 Dec  2 12:21 pg_twophase
drwx------   4 alpha  admin    128 Dec  2 12:21 pg_multixact
drwx------   2 alpha  admin     64 Dec  2 12:21 pg_replslot
drwx------   2 alpha  admin     64 Dec  2 12:21 pg_tblspc
drwx------   2 alpha  admin     64 Dec  2 12:21 pg_stat
drwx------   2 alpha  admin     64 Dec  2 12:21 pg_stat_tmp
-rw-------   1 alpha  admin      3 Dec  2 12:21 PG_VERSION
-rw-------   1 alpha  admin  28731 Dec  2 12:21 postgresql.conf <<<<<<<<< 
-rw-------   1 alpha  admin     88 Dec  2 12:21 postgresql.auto.conf
-rw-------   1 alpha  admin   4789 Dec  2 12:21 pg_hba.conf
-rw-------   1 alpha  admin   1636 Dec  2 12:21 pg_ident.conf
drwx------   4 alpha  admin    128 Dec  2 12:21 pg_wal
drwx------   3 alpha  admin     96 Dec  2 12:21 pg_xact
drwx------   3 alpha  admin     96 Dec  2 12:21 pg_subtrans
drwx------  59 alpha  admin   1888 Dec  2 12:21 global
drwx------   5 alpha  admin    160 Dec  2 12:21 base
drwx------   5 alpha  admin    160 Dec  2 12:21 pg_logical
drwx------  24 alpha  admin    768 Dec  2 12:21 .

Your DB keeps this information for you.您的数据库会为您保留这些信息。 Connect to your database and run show commands.连接到您的数据库并运行show命令。 Eg例如

postgres> # show config_file ;
-[ RECORD 1 ]----------------------------------------------------------
config_file | [your directory structure]/postgresql.conf

postgres> # show data_directory ;
-[ RECORD 1 ]--+------------------------------------------
data_directory | [your directory structure]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM