Skip to content

Commit 1efd902

Browse files
committed
load plrust with preinit fix
1 parent 663b243 commit 1efd902

File tree

2 files changed

+5
-46
lines changed

2 files changed

+5
-46
lines changed

ansible/tasks/postgres-extensions/30-plrust.yml

+3-44
Original file line numberDiff line numberDiff line change
@@ -70,47 +70,6 @@
7070
args:
7171
executable: /bin/bash
7272

73-
- name: plrust - install cargo-pgrx and initialize
74-
shell: |
75-
source $HOME/.cargo/env
76-
cargo install cargo-pgrx --locked
77-
cargo pgrx init --pg{{ postgresql_major }} /usr/bin/pg_config
78-
args:
79-
executable: /bin/bash
80-
81-
- name: plrust - clone plrust
82-
git:
83-
repo: https://github.com/tcdi/plrust
84-
dest: /tmp/plrust
85-
version: v{{ plrust_release }}
86-
87-
88-
- name: plrust - move plrustc binary to .cargo/bin
89-
command:
90-
cmd: mv "/tmp/plrust/plrust/build/bin/plrustc" "$HOME/.cargo/bin/"
91-
warn: false
92-
93-
- name: plrust - build plrust
94-
shell: |
95-
source $HOME/.cargo/env
96-
export PG_VER="{{ postgresql_major }}"
97-
98-
if [[ "{{ platform }}" == "arm64" ]]; then
99-
STD_TARGETS="aarch64-postgres-linux-gnu"
100-
elif [[ "{{ platform }}" == "amd64" ]]; then
101-
STD_TARGETS="amd64-postgres-linux-gnu"
102-
else
103-
echo "Unsupported platform: $platform"
104-
exit 1
105-
fi
106-
./build
107-
args:
108-
executable: /bin/bash
109-
chdir: "/tmp/plrust/plrust"
110-
111-
- name: plrust - install plrust
112-
shell: |
113-
source $HOME/.cargo/env
114-
cargo pgrx install --release --features trusted -c /usr/bin/pg_config
115-
args:
116-
executable: /bin/bash
73+
- name: plrust - install plrust - name: plrust - install cargo-pgrx and initialize
74+
ansible.builtin.apt: shell: |
75+
deb: "https://github.com/supabase/plrust/releases/download/v{{ plrust_release }}/plrust-trusted-{{ plrust_release }}_{{ plrust_language_version }}-debian-pg{{ postgresql_major }}-{{ platform }}.deb"

ansible/vars.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ pgvector_release_checksum: sha256:b76cf84ddad452cc880a6c8c661d137ddd8679c000a163
135135
pg_tle_release: "1.0.4"
136136
pg_tle_release_checksum: sha256:679559584d83fb629c3b56825849fca4ff1fa3355b350aaaf8aa0b7b3460b08a
137137

138-
plrust_release: "1.2.3"
139-
plrust_release_checksum: sha256:e38878c6bed3870edee0c1238de1eaf90f572ddbcb67bf8a577c0ce0a5e70864
138+
plrust_release: "1.2.3-supa"
139+
plrust_release_checksum: sha256:b1af1ccab9c3b8e11dc4a9cee99d51395de4c13770d9d0601b70e86cb97ab02
140140
plrust_language_version: "1.70.0"
141141
plrust_pgrx_version: "0.9.7"

0 commit comments

Comments
 (0)