Skip to content

Commit 4a4a1bd

Browse files
authored
Merge branch 'develop' into PSQL-773
2 parents 9ae839f + 2f6b03c commit 4a4a1bd

40 files changed

+530
-2022
lines changed

.github/actions/nix-install-ephemeral/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ runs:
4444
substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com
4545
trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
4646
${{ inputs.push-to-cache == 'true' && 'post-build-hook = /etc/nix/upload-to-cache.sh' || '' }}
47-
max-jobs = 8
47+
max-jobs = 4

.github/workflows/nix-build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
fail-fast: false
2525
matrix:
2626
include:
27-
- runner: blacksmith-32vcpu-ubuntu-2404
27+
- runner: blacksmith-32vcpu-ubuntu-2404
2828
arch: amd64
2929
- runner: blacksmith-32vcpu-ubuntu-2404-arm
3030
arch: arm64
@@ -66,11 +66,11 @@ jobs:
6666
sudo rm -rf /tmp/* 2>/dev/null || true
6767
echo "=== AFTER CLEANUP ==="
6868
df -h
69-
-
69+
-
7070
name: Build psql bundle
7171
run: >
72-
nix run "github:Mic92/nix-fast-build?rev=b1dae483ab7d4139a6297e02b6de9e5d30e43d48"
73-
-- --skip-cached --no-nom ${{ matrix.runner == 'macos-latest-xlarge' && '--max-jobs 1' || '' }}
72+
nix run "github:Mic92/nix-fast-build?rev=b1dae483ab7d4139a6297e02b6de9e5d30e43d48"
73+
-- --skip-cached --no-nom ${{ matrix.runner == 'macos-latest-xlarge' && '--max-jobs 1' || '' }} --copy-to "s3://nix-postgres-artifacts?secret-key=/etc/nix/nix-secret-key"
7474
--flake ".#checks.$(nix eval --raw --impure --expr 'builtins.currentSystem')"
7575
env:
7676
AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }}

Dockerfile-15

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ ARG pg_repack_release=1.4.8
3030
ARG vault_release=0.2.8
3131
ARG groonga_release=12.0.8
3232
ARG pgroonga_release=2.4.0
33-
ARG wrappers_release=0.5.6
33+
ARG wrappers_release=0.5.7
3434
ARG hypopg_release=1.3.1
3535
ARG pgvector_release=0.4.0
3636
ARG pg_tle_release=1.3.2
@@ -159,18 +159,6 @@ RUN bash -c 'source /usr/local/bin/apt-update-fallback.sh && apt_update_with_fal
159159

160160
ENV PGDATA=/var/lib/postgresql/data
161161

162-
####################
163-
# setup-wal-g.yml
164-
####################
165-
FROM base as walg
166-
ARG wal_g_release
167-
WORKDIR /nixpg
168-
169-
RUN nix profile install .#wal-g-3 && \
170-
ln -s /nix/var/nix/profiles/default/bin/wal-g-3 /tmp/wal-g
171-
172-
RUN nix store gc
173-
174162
WORKDIR /
175163
####################
176164
# setup-groonga
@@ -215,7 +203,6 @@ RUN gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys $GOSU_GPG_KEY &&
215203
FROM gosu as production
216204
RUN id postgres || (echo "postgres user does not exist" && exit 1)
217205
# # Setup extensions
218-
COPY --from=walg /tmp/wal-g /usr/local/bin/
219206
COPY --from=groonga /tmp/groonga-plugins/plugins /usr/lib/groonga/plugins
220207

221208
# # Initialise configs
@@ -237,11 +224,8 @@ RUN sed -i \
237224
-e "s|#session_preload_libraries = ''|session_preload_libraries = 'supautils'|g" \
238225
-e "s|#include = '/etc/postgresql-custom/supautils.conf'|include = '/etc/postgresql-custom/supautils.conf'|g" \
239226
-e "s|#include = '/etc/postgresql-custom/wal-g.conf'|include = '/etc/postgresql-custom/wal-g.conf'|g" /etc/postgresql/postgresql.conf && \
240-
echo "cron.database_name = 'postgres'" >> /etc/postgresql/postgresql.conf && \
241-
#echo "pljava.libjvm_location = '/usr/lib/jvm/java-11-openjdk-${TARGETARCH}/lib/server/libjvm.so'" >> /etc/postgresql/postgresql.conf && \
242227
echo "pgsodium.getkey_script= '/usr/lib/postgresql/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && \
243228
echo "vault.getkey_script= '/usr/lib/postgresql/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && \
244-
echo 'auto_explain.log_min_duration = 10s' >> /etc/postgresql/postgresql.conf && \
245229
usermod -aG postgres wal-g && \
246230
mkdir -p /etc/postgresql-custom/conf.d && \
247231
chown -R postgres:postgres /etc/postgresql-custom

Dockerfile-17

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ARG pg_repack_release=1.4.8
3131
ARG vault_release=0.2.8
3232
ARG groonga_release=12.0.8
3333
ARG pgroonga_release=2.4.0
34-
ARG wrappers_release=0.5.6
34+
ARG wrappers_release=0.5.7
3535
ARG hypopg_release=1.3.1
3636
ARG pgvector_release=0.4.0
3737
ARG pg_tle_release=1.3.2
@@ -163,19 +163,6 @@ RUN bash -c 'source /usr/local/bin/apt-update-fallback.sh && apt_update_with_fal
163163

164164
ENV 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-
179166
WORKDIR /
180167
####################
181168
# setup-groonga
@@ -220,7 +207,6 @@ RUN gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys $GOSU_GPG_KEY &&
220207
FROM gosu as production
221208
RUN id postgres || (echo "postgres user does not exist" && exit 1)
222209
# # Setup extensions
223-
COPY --from=walg /tmp/wal-g /usr/local/bin/
224210
COPY --from=groonga /tmp/groonga-plugins/plugins /usr/lib/groonga/plugins
225211

226212
# # Initialise configs
@@ -242,11 +228,8 @@ RUN sed -i \
242228
-e "s|#session_preload_libraries = ''|session_preload_libraries = 'supautils'|g" \
243229
-e "s|#include = '/etc/postgresql-custom/supautils.conf'|include = '/etc/postgresql-custom/supautils.conf'|g" \
244230
-e "s|#include = '/etc/postgresql-custom/wal-g.conf'|include = '/etc/postgresql-custom/wal-g.conf'|g" /etc/postgresql/postgresql.conf && \
245-
echo "cron.database_name = 'postgres'" >> /etc/postgresql/postgresql.conf && \
246-
#echo "pljava.libjvm_location = '/usr/lib/jvm/java-11-openjdk-${TARGETARCH}/lib/server/libjvm.so'" >> /etc/postgresql/postgresql.conf && \
247231
echo "pgsodium.getkey_script= '/usr/lib/postgresql/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && \
248232
echo "vault.getkey_script= '/usr/lib/postgresql/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && \
249-
echo 'auto_explain.log_min_duration = 10s' >> /etc/postgresql/postgresql.conf && \
250233
usermod -aG postgres wal-g && \
251234
mkdir -p /etc/postgresql-custom/conf.d && \
252235
chown -R postgres:postgres /etc/postgresql-custom

Dockerfile-orioledb-17

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ARG pg_repack_release=1.4.8
3131
ARG vault_release=0.2.8
3232
ARG groonga_release=12.0.8
3333
ARG pgroonga_release=2.4.0
34-
ARG wrappers_release=0.5.6
34+
ARG wrappers_release=0.5.7
3535
ARG hypopg_release=1.3.1
3636
ARG pgvector_release=0.4.0
3737
ARG pg_tle_release=1.3.2
@@ -163,19 +163,6 @@ RUN bash -c 'source /usr/local/bin/apt-update-fallback.sh && apt_update_with_fal
163163

164164
ENV 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-
179166
WORKDIR /
180167
####################
181168
# setup-groonga
@@ -220,7 +207,6 @@ RUN gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys $GOSU_GPG_KEY &&
220207
FROM gosu as production
221208
RUN id postgres || (echo "postgres user does not exist" && exit 1)
222209
# # Setup extensions
223-
COPY --from=walg /tmp/wal-g /usr/local/bin/
224210
COPY --from=groonga /tmp/groonga-plugins/plugins /usr/lib/groonga/plugins
225211

226212
# # Initialise configs
@@ -242,11 +228,8 @@ RUN sed -i \
242228
-e "s|#session_preload_libraries = ''|session_preload_libraries = 'supautils'|g" \
243229
-e "s|#include = '/etc/postgresql-custom/supautils.conf'|include = '/etc/postgresql-custom/supautils.conf'|g" \
244230
-e "s|#include = '/etc/postgresql-custom/wal-g.conf'|include = '/etc/postgresql-custom/wal-g.conf'|g" /etc/postgresql/postgresql.conf && \
245-
echo "cron.database_name = 'postgres'" >> /etc/postgresql/postgresql.conf && \
246-
#echo "pljava.libjvm_location = '/usr/lib/jvm/java-11-openjdk-${TARGETARCH}/lib/server/libjvm.so'" >> /etc/postgresql/postgresql.conf && \
247231
echo "pgsodium.getkey_script= '/usr/lib/postgresql/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && \
248232
echo "vault.getkey_script= '/usr/lib/postgresql/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && \
249-
echo 'auto_explain.log_min_duration = 10s' >> /etc/postgresql/postgresql.conf && \
250233
usermod -aG postgres wal-g && \
251234
mkdir -p /etc/postgresql-custom/conf.d && \
252235
chown -R postgres:postgres /etc/postgresql-custom
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
auto_explain.log_min_duration = 10s
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cron.database_name = 'postgres'

ansible/files/postgresql_config/postgresql.conf.j2

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,5 +773,3 @@ include_dir = '/etc/postgresql-custom/conf.d' # include files ending in '.conf'
773773
#------------------------------------------------------------------------------
774774

775775
# Add settings for extensions here
776-
auto_explain.log_min_duration = 10s
777-
cron.database_name = 'postgres'

ansible/tasks/finalize-ami.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44
group: 'postgres'
55
src: 'files/postgresql_config/postgresql-csvlog.conf'
66

7+
- name: auto_explain and pg_cron confs
8+
ansible.builtin.template:
9+
dest: "/etc/postgresql-custom/conf.d/{{ ext_item }}.conf"
10+
group: 'postgres'
11+
src: "files/postgresql_config/conf.d/{{ ext_item }}.conf"
12+
loop:
13+
- auto_explain
14+
- pg_cron
15+
loop_control:
16+
loop_var: 'ext_item'
17+
718
- name: UFW - Allow SSH connections
819
community.general.ufw:
920
name: 'OpenSSH'

ansible/tasks/setup-pgbouncer.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
- libsystemd-dev
99
- pkg-config
1010
update_cache: true
11-
cache_valid_time: 3600
1211

1312
- name: PgBouncer - download latest release
1413
ansible.builtin.get_url:

0 commit comments

Comments
 (0)