@@ -163,19 +163,6 @@ RUN bash -c 'source /usr/local/bin/apt-update-fallback.sh && apt_update_with_fal
163163
164164ENV PGDATA=/var/lib/postgresql/data
165165
166- ####################
167- # setup-wal-g.yml
168- ####################
169- FROM base as walg
170- ARG wal_g_release
171-
172- WORKDIR /nixpg
173-
174- RUN nix profile install .#wal-g-3 && \
175- ln -s /nix/var/nix/profiles/default/bin/wal-g-3 /tmp/wal-g
176-
177- RUN nix store gc
178-
179166WORKDIR /
180167####################
181168# setup-groonga
@@ -220,7 +207,6 @@ RUN gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys $GOSU_GPG_KEY &&
220207FROM gosu as production
221208RUN id postgres || (echo "postgres user does not exist" && exit 1)
222209# # Setup extensions
223- COPY --from=walg /tmp/wal-g /usr/local/bin/
224210COPY --from=groonga /tmp/groonga-plugins/plugins /usr/lib/groonga/plugins
225211
226212# # Initialise configs
@@ -237,8 +223,11 @@ COPY ansible/files/walg_helper_scripts/wal_change_ownership.sh /root/wal_change_
237223
238224RUN \
239225 echo "unix_socket_directories = '/var/run/postgresql'" >> /etc/postgresql/postgresql.conf && \
240- echo "cron.database_name = 'postgres'" >> /etc/postgresql/postgresql.conf && \
241226 #echo "pljava.libjvm_location = '/usr/lib/jvm/java-11-openjdk-${TARGETARCH}/lib/server/libjvm.so'" >> /etc/postgresql/postgresql.conf && \
227+ sed -i \
228+ -e "s|#session_preload_libraries = ''|session_preload_libraries = 'supautils'|g" \
229+ -e "s|#include = '/etc/postgresql-custom/supautils.conf'|include = '/etc/postgresql-custom/supautils.conf'|g" \
230+ -e "s|#include = '/etc/postgresql-custom/wal-g.conf'|include = '/etc/postgresql-custom/wal-g.conf'|g" /etc/postgresql/postgresql.conf && \
242231 echo "pgsodium.getkey_script= '/usr/lib/postgresql/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && \
243232 echo "vault.getkey_script= '/usr/lib/postgresql/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && \
244233 usermod -aG postgres wal-g && \
@@ -248,21 +237,9 @@ RUN \
248237 # Remove items from postgresql.conf
249238RUN sed -i 's/ timescaledb,//g;' "/etc/postgresql/postgresql.conf"
250239 #as of pg 16.4 + this db_user_namespace totally deprecated and will break the server if setting is present
251- <<<<<<< HEAD
252- RUN sed -i 's/db_user_namespace = off/#db_user_namespace = off/g;' "/etc/postgresql/postgresql.conf"
253- RUN sed -i 's/ timescaledb,//g; s/ plv8,//g; s/ postgis,//g; s/ pgrouting,//g' "/etc/postgresql-custom/conf.d/supautils.conf"
254- RUN sed -i 's/\(shared_preload_libraries.*\)'\''\(.*\)$/\1, orioledb'\''\2/' "/etc/postgresql/postgresql.conf"
255- RUN echo "default_table_access_method = 'orioledb'" >> "/etc/postgresql/postgresql.conf"
256- ||||||| 1e598fb38
257- RUN sed -i 's/db_user_namespace = off/#db_user_namespace = off/g;' "/etc/postgresql/postgresql.conf"
258- RUN sed -i 's/ timescaledb,//g; s/ plv8,//g; s/ postgis,//g; s/ pgrouting,//g' "/etc/postgresql-custom/supautils.conf"
259- RUN sed -i 's/\(shared_preload_libraries.*\)'\''\(.*\)$/\1, orioledb'\''\2/' "/etc/postgresql/postgresql.conf"
260- RUN echo "default_table_access_method = 'orioledb'" >> "/etc/postgresql/postgresql.conf"
261- =======
262240RUN sed -i 's/ timescaledb,//g; s/ plv8,//g; s/ postgis,//g; s/ pgrouting,//g' "/etc/postgresql-custom/supautils.conf"
263241RUN sed -i 's/\(shared_preload_libraries.*\)'\''\(.*\)$/\1, orioledb'\''\2/' "/etc/postgresql/postgresql.conf"
264242RUN echo "default_table_access_method = 'orioledb'" >> "/etc/postgresql/postgresql.conf"
265- >>>>>>> origin/develop
266243
267244# OrioleDB rewind configuration
268245# Enables time-based rewind capability for up to 20 minutes (1200 seconds)
0 commit comments