Skip to content

Commit 8d3059c

Browse files
committed
fix: only require PG optimizations on internal builds
The optimizations are generated by the admin-api, which is only installed on internal builds. Additionally, the installation of Supabase internal content is moved up to before the PG db is started to avoid failing on missing dependent tasks.
1 parent a387fe6 commit 8d3059c

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

ansible/files/postgresql_config/postgresql.service.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
[Unit]
22
Description=PostgreSQL database server
33
Documentation=man:postgres(1)
4+
{% if supabase_internal is defined %}
45
Requires=generate-optimizations.service
56
After=generate-optimizations.service
7+
{% endif %}
68

79
[Service]
810
Type=notify

ansible/playbook.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,22 @@
1515
PATH: /usr/lib/postgresql/bin:{{ ansible_env.PATH }}
1616

1717
tasks:
18+
- set_fact:
19+
supabase_internal: true
20+
tags:
21+
- install-supabase-internal
22+
1823
- name: Install Postgres from source
1924
import_tasks: tasks/setup-postgres.yml
2025

2126
- name: Install Postgres extensions
2227
import_tasks: tasks/setup-extensions.yml
2328

29+
- name: Install Supabase specific content
30+
import_tasks: tasks/setup-supabase-internal.yml
31+
tags:
32+
- install-supabase-internal
33+
2434
- name: Start Postgres Database
2535
systemd:
2636
name: postgresql
@@ -57,11 +67,6 @@
5767
import_tasks: tasks/setup-postgrest.yml
5868
tags:
5969
- install-postgrest
60-
61-
- name: Install Supabase specific content
62-
import_tasks: tasks/setup-supabase-internal.yml
63-
tags:
64-
- install-supabase-internal
6570

6671
- name: Clean out build dependencies
6772
import_tasks: tasks/clean-build-dependencies.yml

common.vars.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"postgres-version": "14.1.0.15-rc1"
2+
"postgres-version": "14.1.0.15-rc2"
33
}

0 commit comments

Comments
 (0)