Skip to content

Commit 739f250

Browse files
committed
refactor: Remove wal-g v3 and simplify build
- Removes the `wal-g-3` Nix package definition and all associated build/installation steps from Dockerfiles and Ansible playbooks. - Standardizes on `wal-g-2` as the sole WAL-G version used, simplifying the build process and reducing complexity. - Cleans up related checks and package definitions in Nix.
1 parent 25d86be commit 739f250

File tree

7 files changed

+1
-63
lines changed

7 files changed

+1
-63
lines changed

Dockerfile-15

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -110,18 +110,6 @@ RUN apt-get update && \
110110

111111
ENV PGDATA=/var/lib/postgresql/data
112112

113-
####################
114-
# setup-wal-g.yml
115-
####################
116-
FROM base as walg
117-
ARG wal_g_release
118-
WORKDIR /nixpg
119-
120-
RUN nix profile install .#wal-g-3 && \
121-
ln -s /nix/var/nix/profiles/default/bin/wal-g-3 /tmp/wal-g
122-
123-
RUN nix store gc
124-
125113
WORKDIR /
126114
####################
127115
# setup-groonga
@@ -166,7 +154,6 @@ RUN gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys $GOSU_GPG_KEY &&
166154
FROM gosu as production
167155
RUN id postgres || (echo "postgres user does not exist" && exit 1)
168156
# # Setup extensions
169-
COPY --from=walg /tmp/wal-g /usr/local/bin/
170157
COPY --from=groonga /tmp/groonga-plugins/plugins /usr/lib/groonga/plugins
171158

172159
# # Initialise configs

Dockerfile-17

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -114,19 +114,6 @@ RUN apt-get update && \
114114

115115
ENV PGDATA=/var/lib/postgresql/data
116116

117-
####################
118-
# setup-wal-g.yml
119-
####################
120-
FROM base as walg
121-
ARG wal_g_release
122-
123-
WORKDIR /nixpg
124-
125-
RUN nix profile install .#wal-g-3 && \
126-
ln -s /nix/var/nix/profiles/default/bin/wal-g-3 /tmp/wal-g
127-
128-
RUN nix store gc
129-
130117
WORKDIR /
131118
####################
132119
# setup-groonga
@@ -171,7 +158,6 @@ RUN gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys $GOSU_GPG_KEY &&
171158
FROM gosu as production
172159
RUN id postgres || (echo "postgres user does not exist" && exit 1)
173160
# # Setup extensions
174-
COPY --from=walg /tmp/wal-g /usr/local/bin/
175161
COPY --from=groonga /tmp/groonga-plugins/plugins /usr/lib/groonga/plugins
176162

177163
# # Initialise configs

Dockerfile-orioledb-17

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -114,19 +114,6 @@ RUN apt-get update && \
114114

115115
ENV PGDATA=/var/lib/postgresql/data
116116

117-
####################
118-
# setup-wal-g.yml
119-
####################
120-
FROM base as walg
121-
ARG wal_g_release
122-
123-
WORKDIR /nixpg
124-
125-
RUN nix profile install .#wal-g-3 && \
126-
ln -s /nix/var/nix/profiles/default/bin/wal-g-3 /tmp/wal-g
127-
128-
RUN nix store gc
129-
130117
WORKDIR /
131118
####################
132119
# setup-groonga
@@ -171,7 +158,6 @@ RUN gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys $GOSU_GPG_KEY &&
171158
FROM gosu as production
172159
RUN id postgres || (echo "postgres user does not exist" && exit 1)
173160
# # Setup extensions
174-
COPY --from=walg /tmp/wal-g /usr/local/bin/
175161
COPY --from=groonga /tmp/groonga-plugins/plugins /usr/lib/groonga/plugins
176162

177163
# # Initialise configs

ansible/tasks/setup-wal-g.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,6 @@
3333
cmd: sudo -u wal-g bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install github:supabase/postgres/{{ git_commit_sha }}#wal-g-2"
3434
become: true
3535

36-
- name: Install wal-g 3 from nix binary cache
37-
ansible.builtin.shell:
38-
cmd: sudo -u wal-g bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install github:supabase/postgres/{{ git_commit_sha }}#wal-g-3"
39-
become: true
40-
41-
- name: Create symlink for wal-g-3 from Nix profile to /usr/local/bin
42-
ansible.builtin.file:
43-
dest: '/usr/local/bin/wal-g-v3'
44-
force: true
45-
src: '/home/wal-g/.nix-profile/bin/wal-g-3'
46-
state: 'link'
47-
become: true
48-
4936
- name: Create symlink to make wal-g-v2 the default wal-g
5037
ansible.builtin.file:
5138
dest: '/usr/local/bin/wal-g'

nix/checks.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,6 @@
394394
);
395395
inherit (self'.packages)
396396
wal-g-2
397-
wal-g-3
398397
dbmate-tool
399398
packer
400399
pg_regress

nix/packages/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
sync-exts-versions = pkgs.callPackage ./sync-exts-versions.nix { inherit (inputs') nix-editor; };
6969
trigger-nix-build = pkgs.callPackage ./trigger-nix-build.nix { };
7070
update-readme = pkgs.callPackage ./update-readme.nix { };
71-
inherit (pkgs.callPackage ./wal-g.nix { }) wal-g-2 wal-g-3;
71+
inherit (pkgs.callPackage ./wal-g.nix { }) wal-g-2;
7272
inherit (pkgs.cargo-pgrx)
7373
cargo-pgrx_0_11_3
7474
cargo-pgrx_0_12_6

nix/packages/wal-g.nix

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,4 @@ in
7878
majorVersion = "2";
7979
};
8080

81-
# wal-g v3.0.5
82-
wal-g-3 = walGCommon {
83-
version = "3.0.5";
84-
sha256 = "sha256-wVr0L2ZXMuEo6tc2ajNzPinVQ8ZVzNOSoaHZ4oFsA+U=";
85-
vendorHash = "sha256-YDLAmRfDl9TgbabXj/1rxVQ052NZDg3IagXVTe5i9dw=";
86-
majorVersion = "3";
87-
};
8881
}

0 commit comments

Comments
 (0)