8000 fix: postgres bin directory location for pgsodium extension when runn… · sorokinvld/postgres@37ac0a9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 37ac0a9

Browse files
authored
fix: postgres bin directory location for pgsodium extension when running a docker build (supabase#147)
1 parent 3ec889c commit 37ac0a9

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

ansible/files/postgresql_config/postgresql.conf.j2

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -723,8 +723,7 @@ shared_preload_libraries = 'pg_stat_statements, pgaudit, plpgsql, plpgsql_check,
723723
jit_provider = 'llvmjit' # JIT library to use
724724

725725
# - Other Defaults -
726-
727-
pgsodium.getkey_script= '/usr/lib/postgresql/bin/pgsodium_getkey_urandom.sh'
726+
pgsodium.getkey_script= '{{ pg_bindir }}/pgsodium_getkey_urandom.sh'
728727

729728
#dynamic_library_path = '$libdir'
730729
#gin_fuzzy_search_limit = 0

ansible/tasks/docker/setup.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,14 @@
2727
- set_fact:
2828
platform: "{{ platform_output.stdout }}"
2929

30+
- name: pgsodium - store postgres bin directory
31+
shell: pg_config --bindir
32+
register: pg_bindir_output
33+
- set_fact:
34+
pg_bindir: "{{ pg_bindir_output.stdout }}"
35+
3036
- name: Setup - import postgresql.conf
31-
synchronize:
37+
template:
3238
src: files/postgresql_config/postgresql.conf.j2
3339
dest: /etc/postgresql/postgresql.conf
3440

ansible/tasks/postgres-extensions/18-pgsodium.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
- name: import pgsodium_getkey_urandom.sh
6060
template:
6161
src: files/pgsodium_getkey_urandom.sh.j2
62-
dest: /usr/lib/postgresql/bin/pgsodium_getkey_urandom.sh
62+
dest: "{{ pg_bindir }}/pgsodium_getkey_urandom.sh"
6363
owner: postgres
6464
group: postgres
6565
mode: 0700

0 commit comments

Comments
 (0)
0