Skip to content

Commit 241f542

Browse files
committed
chore: move static ext configs to base template
1 parent af52029 commit 241f542

File tree

7 files changed

+2
-43
lines changed

7 files changed

+2
-43
lines changed

Dockerfile

-6
Original file line numberDiff line numberDiff line change
@@ -613,10 +613,6 @@ RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccac
613613
# Create debian package
614614
RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc
615615

616-
####################
617-
# 21-auto_explain.yml
618-
####################
619-
620616
####################
621617
# 22-pg_jsonschema.yml
622618
####################
@@ -937,10 +933,8 @@ RUN sed -i \
937933
-e "s|#session_preload_libraries = ''|session_preload_libraries = 'supautils'|g" \
938934
-e "s|#include = '/etc/postgresql-custom/supautils.conf'|include = '/etc/postgresql-custom/supautils.conf'|g" \
939935
-e "s|#include = '/etc/postgresql-custom/wal-g.conf'|include = '/etc/postgresql-custom/wal-g.conf'|g" /etc/postgresql/postgresql.conf && \
940-
echo "cron.database_name = 'postgres'" >> /etc/postgresql/postgresql.conf && \
941936
echo "pljava.libjvm_location = '/usr/lib/jvm/java-11-openjdk-${TARGETARCH}/lib/server/libjvm.so'" >> /etc/postgresql/postgresql.conf && \
942937
echo "pgsodium.getkey_script= '/usr/lib/postgresql/${postgresql_major}/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && \
943-
echo 'auto_explain.log_min_duration = 10s' >> /etc/postgresql/postgresql.conf && \
944938
useradd --create-home --shell /bin/bash wal-g -G postgres && \
945939
mkdir -p /etc/postgresql-custom && \
946940
chown postgres:postgres /etc/postgresql-custom

ansible/files/postgresql_config/postgresql.conf.j2

+2
Original file line numberDiff line numberDiff line change
@@ -774,4 +774,6 @@ include = '/etc/postgresql-custom/read-replica.conf'
774774
#------------------------------------------------------------------------------
775775

776776
# Add settings for extensions here
777+
auto_explain.log_min_duration = 10s
778+
cron.database_name = 'postgres'
777779
safeupdate.enabled = off

ansible/tasks/postgres-extensions/04-pg_cron.yml

-7
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@
2424
target: install
2525
become: yes
2626

27-
- name: pg_cron - set cron.database_name
28-
become: yes
29-
lineinfile:
30-
path: /etc/postgresql/postgresql.conf
31-
state: present
32-
line: cron.database_name = 'postgres'
33-
3427
- name: pg_cron - cleanup
3528
file:
3629
state: absent

ansible/tasks/postgres-extensions/21-auto_explain.yml

-7
This file was deleted.

ansible/tasks/setup-docker.yml

-14
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@
1010
apt-get update
1111
apt-get install -y --no-install-recommends /tmp/extensions/*.deb
1212
13-
- name: pg_cron - set cron.database_name
14-
become: yes
15-
lineinfile:
16-
path: /etc/postgresql/postgresql.conf
17-
state: present
18-
line: cron.database_name = 'postgres'
19-
2013
- name: pgsodium - determine postgres bin directory
2114
shell: pg_config --bindir
2215
register: pg_bindir_output
@@ -31,13 +24,6 @@
3124
# script is expected to be placed by finalization tasks for different target platforms
3225
line: pgsodium.getkey_script= '{{ pg_bindir }}/pgsodium_getkey.sh'
3326

34-
- name: auto_explain - set auto_explain.log_min_duration
35-
become: yes
36-
lineinfile:
37-
path: /etc/postgresql/postgresql.conf
38-
state: present
39-
line: auto_explain.log_min_duration = 10s
40-
4127
# supautils
4228
- name: supautils - add supautils to session_preload_libraries
4329
become: yes

ansible/tasks/setup-extensions.yml

-3
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@
6565
- name: Install pg_stat_monitor
6666
import_tasks: tasks/postgres-extensions/20-pg_stat_monitor.yml
6767

68-
- name: Install auto_explain
69-
import_tasks: tasks/postgres-extensions/21-auto_explain.yml
70-
7168
- name: Install vault
7269
import_tasks: tasks/postgres-extensions/23-vault.yml
7370

docker/orioledb/Dockerfile

-6
Original file line numberDiff line numberDiff line change
@@ -615,10 +615,6 @@ RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccac
615615
# Create debian package
616616
RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc
617617

618-
####################
619-
# 21-auto_explain.yml
620-
####################
621-
622618
####################
623619
# 22-pg_jsonschema.yml
624620
####################
@@ -1033,10 +1029,8 @@ RUN sed -i \
10331029
-e "s|#max_wal_size = 1GB|max_wal_size = 8GB|g" \
10341030
-e "s|#include = '/etc/postgresql-custom/supautils.conf'|include = '/etc/postgresql-custom/supautils.conf'|g" \
10351031
-e "s|#include = '/etc/postgresql-custom/wal-g.conf'|include = '/etc/postgresql-custom/wal-g.conf'|g" /etc/postgresql/postgresql.conf && \
1036-
echo "cron.database_name = 'postgres'" >> /etc/postgresql/postgresql.conf && \
10371032
echo "pljava.libjvm_location = '/usr/lib/jvm/java-11-openjdk-${TARGETARCH}/lib/server/libjvm.so'" >> /etc/postgresql/postgresql.conf && \
10381033
echo "pgsodium.getkey_script= '/usr/lib/postgresql/${postgresql_major}/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && \
1039-
echo 'auto_explain.log_min_duration = 10s' >> /etc/postgresql/postgresql.conf && \
10401034
echo "orioledb.main_buffers = 1GB" >> /etc/postgresql/postgresql.conf && \
10411035
echo "orioledb.undo_buffers = 256MB" >> /etc/postgresql/postgresql.conf && \
10421036
useradd --create-home --shell /bin/bash wal-g -G postgres && \

0 commit comments

Comments
 (0)