Separating config using PGDATA does not seem to behave as described in the docs
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
调研方向
首先,复现 issue 中描述的、包含 PGDATA、挂载的 postgresql.conf 和 data_directory 的确切 postgres:15.2 Docker 命令。将观察到的初始化行为与 PostgreSQL 关于运行时配置文件位置的文档进行比较;完成的标准是确定 image 的行为还是文档与预期设置存在冲突。
由索引模型根据 Issue 内容生成。
描述
https://www.postgresql.org/docs/15/runtime-config-file-locations.html
If you wish to keep the configuration files elsewhere than the data directory, the
postgres -Dcommand-line option orPGDATAenvironment variable must point to the directory containing the configuration files, and thedata_directoryparameter must be set inpostgresql.conf(or on the command line) to show where the data directory is actually located. Notice thatdata_directoryoverrides-DandPGDATAfor the location of the data directory, but not for the location of the configuration files.
$ sudo grep data_directory /example/postgresql.conf
data_directory = '/var/lib/postgresql/data' # use data in another directory
$ sudo docker run -e PGDATA=/etc/postgresql -e POSTGRES_PASSWORD=foo -v /example/postgresql.conf:/etc/postgresql/postgresql.conf -v /example/postgresql-data:/var/lib/postgresql/data postgres:15.2
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
initdb: error: directory "/etc/postgresql" exists but is not empty
initdb: hint: If you want to create a new database system, either remove or empty the directory "/etc/postgresql" or run initdb with an argument other than "/etc/postgresql".
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
Am I missing something? I'm trying to have postgres to look at my config file, see data_directory, and initialize a new DB in data_directory if it is empty, otherwise use it as-is.
- 主要语言
- Shell
- 星标
- 2.5k
- 派生
- 1.2k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
docker-library/postgres 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 48/100
docker-library/postgres#1420 ·
-
难度 4/5 3-5 天 新手友好度 48/100
docker-library/postgres#1419 · 2 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
docker-library/postgres#1389 ·
-
难度 2/5 1-3 小时 新手友好度 35/100
docker-library/postgres#1356 · 5 条评论 · 7 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 25/100
docker-library/postgres#1355 · 10 条评论 · 11 个 reaction ·
查看 docker-library/postgres 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
interledger/rhyza#352 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
beehive-lab/TornadoVM#1248 ·
维护者通常 1 天内回复
-
Dev
难度 2/5 1-3 小时 新手友好度 62/100
ankidroid/Anki-Android#22555 ·
维护者通常 1 天内回复
-
difficulty: easy domain: devops effort: 1-4h enhancement good first issue smart-contracts Stellar Wave
难度 2/5 1-3 小时 新手友好度 72/100
Kaycee276/Chesster#469 · 2 条评论 ·
维护者通常 1 天内回复
-
Add .gitignore可能已有人在做 @ajeanmahoney 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100