Setting Postgres extensions via POSTGRESQL_EXTENSIONS env
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
Direzione di ricerca
Start with the PostgreSQL 15 logic in root/usr/share/container-scripts/postgresql/common.sh around lines 491-498, then inspect the extension test in test/run_test around lines 1079-1088. Reproduce the issue using the provided podman command and verify whether POSTGRESQL_EXTENSIONS is processed during initialization. Done means the reported pg_trgm setup behavior is explained and the test or initialization behavior is corrected.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hey Gang!
I'm attempting to start Postgres-15 with an extension: POSTGRESQL_EXTENSIONS="pg_trgm" but it does not seem to work as expected
The shell script here seems to be where the action happens:
https://github.com/sclorg/postgresql-container/blob/4d36fddfb7afb5bbb3e1eaa78c3c132f5ee807cb/15/root/usr/share/container-scripts/postgresql/common.sh#L491-L498
For context, I'm setting up a Quay instance with Postgres and that requires the pg_trgm extension.
Steps to reproduce:
##
## Setup storage and fix permissions
##
sudo mkdir -pv /mnt/quay/postgres-data
sudo setfacl -m u:26:-wx /mnt/quay/postgres-data
##
## Run the container
##
sudo podman pod create \
--name quay-pod \
-p 80:8080 \
-p 443:8443
sudo podman run \
--name quay_postgres \
--pod quay-pod \
--rm -d \
-e POSTGRESQL_USER=quayuser \
-e POSTGRESQL_PASSWORD=quaypass \
-e POSTGRESQL_DATABASE=quay \
-e POSTGRESQL_ADMIN_PASSWORD=adminpass \
-e POSTGRESQL_EXTENSIONS="pg_trgm " \
-v /mnt/quay/postgres-data:/var/lib/pgsql/data:Z \
quay.io/fedora/postgresql-15
##
## The verification step will show if the "pg_trgm" extension was installed.
##
sudo podman exec -it quay_postgres psql -U quayuser -d quay -c "\dx pg_trgm"
List of installed extensions
Name | Version | Schema | Description
------+---------+--------+-------------
(0 rows)
The pg_trgm extension does in fact work if setup after the container is running.
sudo podman exec -it quay_postgres psql -U quayuser -d quay -c "CREATE EXTENSION IF NOT EXISTS pg_trgm;"
sudo podman exec -it quay_postgres psql -U quayuser -d quay -c "\dx pg_trgm"
CREATE EXTENSION
List of installed extensions
Name | Version | Schema | Description
---------+---------+--------+-------------------------------------------------------------------
pg_trgm | 1.6 | public | text similarity measurement and index searching based on trigrams
(1 row)
So it appears the feature to run extensions from the environment variable is not working, at least not in this case.
I see there are tests for the feature:
https://github.com/sclorg/postgresql-container/blob/4d36fddfb7afb5bbb3e1eaa78c3c132f5ee807cb/test/run_test#L1079-L1088
But I'm not sure how well that test works, and I've not tried running the test myself (not yet).
Can somebody chime in and say if the issue is legit?
Thanks in advance!
- Lingua principale
- PLpgSQL
- Stelle
- 178
- Fork
- 220
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di sclorg/postgresql-container
-
PostgreSQL 16 images based on EL10 have an incorrect POSTGRESQL_PREV_VERSION setForse già presa @ShimShtein l’ha presa 115 giorni fa. Aperta
Difficoltà 2/5 1-2 giorni Idoneità per principianti 72/100
sclorg/postgresql-container#661 ·
-
c10s images are not multi-arch while their corresponding c9s images are.Forse già presa @kkyrazis l’ha presa 75 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
sclorg/postgresql-container#668 ·
-
Dockerfile failingAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 55/100
sclorg/postgresql-container#656 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 50/100
sclorg/postgresql-container#654 ·
-
Running Postgres in OpenShift with persistence volume is failing with user permissions issuesForse di nuovo libera @phracek l’ha presa 577 giorni fa e non c’è nessuna pull request aperta. Aperta
sclorg/postgresql-container#605 · 10 commenti · 1 assegnatario ·
Tutte le issue di sclorg/postgresql-container
Issue simili
-
[BUG] dcg.waggr permutation p-values are folded twice, so near-zero scores get the smallest p-valuesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
scverse/rapids-singlecell#854 ·
I maintainer di solito rispondono entro 1 giorno
-
SQL detection rejects valid statements with extra whitespace around tokens or after the semicolonForse già presa @PerryLink l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
area-testing p1-recommended
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Unblock: Kanal11.seApertablocklist:remove check:passed
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
-
checkpoint/verify/rebuild_indexes on a thread holding a WriteTransaction deadlock instead of INT-001Apertabug known-issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
project-minigraf/minigraf#734 ·
I maintainer di solito rispondono entro 1 giorno