Separating config using PGDATA does not seem to behave as described in the docs
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện chính xác lệnh Docker của postgres:15.2 với PGDATA, postgresql.conf được mount và data_directory được mô tả trong issue. So sánh hành vi khởi tạo quan sát được với tài liệu của PostgreSQL về vị trí các tệp cấu hình runtime; công việc được xem là hoàn tất khi xác định được hành vi của image hay tài liệu mâu thuẫn với thiết lập dự kiến.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Shell
- Star
- 2.5k
- Fork
- 1.2k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của docker-library/postgres
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
docker-library/postgres#1420 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
docker-library/postgres#1419 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
docker-library/postgres#1389 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
docker-library/postgres#1356 · 5 bình luận · 7 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
docker-library/postgres#1355 · 10 bình luận · 11 reaction ·
Tất cả issue của docker-library/postgres
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
components-web-app/docs#228 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
int-brain-lab/iblscripts#127 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ValveSoftware/SteamOS#2927 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
msys2/MSYS2-packages#6813 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Laptop display stays disabled after unplugging external monitor: FALLBACK output counted as externalCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày