Skip to content

Commit

Permalink
Add pg_repack extension
Browse files Browse the repository at this point in the history
Our solutions engineers and some customers would like to have this
extension available. We are using a commit instead of a tagged release
because pg_repack maintainers have not tagged a release which contains
the commit that allows us to run pg_repack as a non-superuser.

Closes: neondatabase/cloud#18890
Link: reorg/pg_repack#431 (comment)
Signed-off-by: Tristan Partin <[email protected]>
  • Loading branch information
tristan957 committed Dec 17, 2024
1 parent c5e3314 commit 5fbd8f8
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions compute/compute-node.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -1168,6 +1168,25 @@ RUN case "${PG_VERSION}" in \
make BUILD_TYPE=release -j $(getconf _NPROCESSORS_ONLN) install && \
echo 'trusted = true' >> /usr/local/pgsql/share/extension/pg_mooncake.control

#########################################################################################
#
# Layer "pg_repack"
# compile pg_repack extension
#
#########################################################################################

FROM build-deps AS pg-repack-build
ARG PG_VERSION
COPY --from=pg-build /usr/local/pgsql/ /usr/local/pgsql/

ENV PATH="/usr/local/pgsql/bin/:$PATH"

RUN wget https://github.com/reorg/pg_repack/archive/refs/tags/ver_1.5.2.tar.gz -O pg_repack.tar.gz && \
echo '4516cad42251ed3ad53ff619733004db47d5755acac83f75924cd94d1c4fb681 pg_repack.tar.gz' | sha256sum --check && \
mkdir pg_repack-src && cd pg_repack-src && tar xzf ../pg_repack.tar.gz --strip-components=1 -C . && \
make -j $(getconf _NPROCESSORS_ONLN) && \
make -j $(getconf _NPROCESSORS_ONLN) install

#########################################################################################
#
# Layer "neon-pg-ext-build"
Expand Down Expand Up @@ -1213,6 +1232,7 @@ COPY --from=pg-anon-pg-build /usr/local/pgsql/ /usr/local/pgsql/
COPY --from=pg-ivm-build /usr/local/pgsql/ /usr/local/pgsql/
COPY --from=pg-partman-build /usr/local/pgsql/ /usr/local/pgsql/
COPY --from=pg-mooncake-build /usr/local/pgsql/ /usr/local/pgsql/
COPY --from=pg-repack-build /usr/local/pgsql/ /usr/local/pgsql/
COPY pgxn/ pgxn/

RUN make -j $(getconf _NPROCESSORS_ONLN) \
Expand Down

0 comments on commit 5fbd8f8

Please sign in to comment.