Skip to content

Commit 2e70b74

Browse files
authored
Merge branch 'develop' into multi-version-ext/pg-partman
2 parents c463b78 + ae662e8 commit 2e70b74

File tree

15 files changed

+25
-91
lines changed

15 files changed

+25
-91
lines changed

Dockerfile-15

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -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,8 +224,6 @@ 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 && \
244229
usermod -aG postgres wal-g && \

Dockerfile-17

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -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,8 +228,6 @@ 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 && \
249233
usermod -aG postgres wal-g && \

Dockerfile-orioledb-17

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -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,8 +228,6 @@ 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 && \
249233
usermod -aG postgres wal-g && \

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ This is the same PostgreSQL build that powers [Supabase](https://supabase.io), b
294294
| Goodie | Version | Description |
295295
| ------------- | :-------------: | ------------- |
296296
| [PgBouncer](https://www.pgbouncer.org/) | [1.19.0](http://www.pgbouncer.org/changelog.html#pgbouncer-119x) | Set up Connection Pooling. |
297-
| [PostgREST](https://postgrest.org/en/stable/) | [v13.0.4](https://github.com/PostgREST/postgrest/releases/tag/v13.0.4) | Instantly transform your database into an RESTful API. |
297+
| [PostgREST](https://postgrest.org/en/stable/) | [v14.1](https://github.com/PostgREST/postgrest/releases/tag/v14.1) | Instantly transform your database into an RESTful API. |
298298
| [WAL-G](https://github.com/wal-g/wal-g#wal-g) | [v2.0.1](https://github.com/wal-g/wal-g/releases/tag/v2.0.1) | Tool for physical database backup and recovery. | -->
299299

300300

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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,4 +773,3 @@ include_dir = '/etc/postgresql-custom/conf.d' # include files ending in '.conf'
773773
#------------------------------------------------------------------------------
774774

775775
# Add settings for extensions here
776-
cron.database_name = 'postgres'

ansible/tasks/finalize-ami.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
src: "files/postgresql_config/conf.d/{{ ext_item }}.conf"
1212
loop:
1313
- auto_explain
14-
# - pg_cron
14+
- pg_cron
1515
loop_control:
1616
loop_var: 'ext_item'
1717

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:

ansible/tasks/setup-postgrest.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
state: 'present'
55

66
- name: PostgREST - add Postgres PPA gpg key
7-
ansible.builtin.apt_key:
7+
ansible.builtin.get_url:
8+
dest: /etc/apt/trusted.gpg.d/ppdg.asc
9+
force: true
10+
mode: '0644'
811
url: 'https://www.postgresql.org/media/keys/ACCC4CF8.asc'
9-
state: 'present'
1012

1113
- name: PostgREST - add Postgres PPA main
1214
ansible.builtin.apt_repository:
@@ -30,9 +32,9 @@
3032
msg: "Installed libpq5 version: {{ ansible_facts['packages']['libpq5'][0]['version'] }}"
3133

3234
- name: PostgREST - remove Postgres PPA gpg key
33-
ansible.builtin.apt_key:
35+
ansible.builtin.file:
36+
path: /etc/apt/trusted.gpg.d/ppdg.asc
3437
state: 'absent'
35-
url: 'https://www.postgresql.org/media/keys/ACCC4CF8.asc'
3638

3739
- name: PostgREST - remove Postgres PPA
3840
ansible.builtin.apt_repository:
@@ -58,7 +60,7 @@
5860
{%- if platform == "arm64" -%}
5961
ubuntu-aarch64
6062
{%- elif platform == "amd64" -%}
61-
inux-static-x86-64
63+
linux-static-x86-64
6264
{%- endif -%}
6365
6466
- name: PostgREST - unpack archive in /opt

ansible/tasks/setup-system.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,13 @@
154154
value: 60
155155
state: 'present'
156156

157+
# postgres_exporter runs on port 9187 and postgresT occasionlly chooses it as random srcport
158+
- name: Set net.ipv4.ip_local_reserved_ports=9187
159+
ansible.builtin.sysctl:
160+
name: 'net.ipv4.ip_local_reserved_ports'
161+
value: 9187
162+
state: 'present'
163+
157164
- name: Execute tasks when (debpkg_mode or nixpkg_mode)
158165
when:
159166
- (debpkg_mode or nixpkg_mode)

0 commit comments

Comments
 (0)