From 8072f6d73033e14a3c022f3bf51b11d7aa793035 Mon Sep 17 00:00:00 2001 From: Mehmet Yilmaz Date: Mon, 21 Jul 2025 15:24:01 +0300 Subject: [PATCH 1/3] Add PG18 beta version to the list of PostgreSQL versions --- circleci/images/PG_VERSIONS | 1 + 1 file changed, 1 insertion(+) diff --git a/circleci/images/PG_VERSIONS b/circleci/images/PG_VERSIONS index 1c94c40..40a0efe 100644 --- a/circleci/images/PG_VERSIONS +++ b/circleci/images/PG_VERSIONS @@ -1,3 +1,4 @@ PG15=15.13 PG16=16.9 PG17=17.5 +PG18=18~beta2 \ No newline at end of file From 654d5f560684979834a14e533bbd59e7548fb63a Mon Sep 17 00:00:00 2001 From: Mehmet Yilmaz Date: Mon, 21 Jul 2025 19:23:42 +0300 Subject: [PATCH 2/3] Enhance Dockerfile: Add Postgres libs and fix libpq symlink for compatibility with PG 15/16 --- circleci/images/exttester/Dockerfile | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/circleci/images/exttester/Dockerfile b/circleci/images/exttester/Dockerfile index 7b00a44..fa0b9ec 100644 --- a/circleci/images/exttester/Dockerfile +++ b/circleci/images/exttester/Dockerfile @@ -89,6 +89,9 @@ FROM buildpack-deps:bullseye # add unpriviliged user for tests RUN useradd -ms /bin/bash circleci +# bring in the built Postgres libs so pg_regress_multi’s LD_LIBRARY_PATH has something to find +COPY --from=dev-tools-builder /build /build + RUN <<'EOF' # install dependencies set -eux @@ -183,7 +186,24 @@ ENV PATH=/usr/lib/postgresql/$PG_MAJOR/bin/:$PATH # setup /var/run/postgresql for use with circleci RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod 2777 /var/run/postgresql -# copy the collected files from the collection container at once into the final container -COPY --from=dev-tools-collection /collect/ / +# -------------------------------------------------------------------- +# The COPY above can white‑out /usr/lib/x86_64-linux-gnu when BuildKit +# is active, removing libpq.so.* that was installed earlier. We +# (re)install libpq5, recreate the helper symlink for PG ≤ 16, refresh +# the loader cache, and preload the client library so Citus never +# complains about symbol interposition. +# -------------------------------------------------------------------- +ARG PG_MAJOR +RUN set -eux; \ + # 2. Satisfy RUNPATH for PG 15/16 (harmless for ≥17) + ln -sf /usr/lib/x86_64-linux-gnu/libpq.so.5 \ + /usr/lib/postgresql/${PG_MAJOR}/lib/libpq.so.5; \ + \ + # 3. Refresh dynamic‑linker cache + echo "/usr/lib/x86_64-linux-gnu" > /etc/ld.so.conf.d/libpq.conf; \ + ldconfig + +# 4. Make sure the backend and Citus load the *same* libpq object +ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libpq.so.5 WORKDIR /home/circleci From c62fac58c34afe6e680aba0a8aeb9e4166f23f2a Mon Sep 17 00:00:00 2001 From: Mehmet Yilmaz Date: Tue, 22 Jul 2025 10:56:41 +0300 Subject: [PATCH 3/3] Refactor Dockerfile: Simplify Postgres library handling and streamline file copying --- circleci/images/exttester/Dockerfile | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/circleci/images/exttester/Dockerfile b/circleci/images/exttester/Dockerfile index fa0b9ec..7b00a44 100644 --- a/circleci/images/exttester/Dockerfile +++ b/circleci/images/exttester/Dockerfile @@ -89,9 +89,6 @@ FROM buildpack-deps:bullseye # add unpriviliged user for tests RUN useradd -ms /bin/bash circleci -# bring in the built Postgres libs so pg_regress_multi’s LD_LIBRARY_PATH has something to find -COPY --from=dev-tools-builder /build /build - RUN <<'EOF' # install dependencies set -eux @@ -186,24 +183,7 @@ ENV PATH=/usr/lib/postgresql/$PG_MAJOR/bin/:$PATH # setup /var/run/postgresql for use with circleci RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod 2777 /var/run/postgresql -# -------------------------------------------------------------------- -# The COPY above can white‑out /usr/lib/x86_64-linux-gnu when BuildKit -# is active, removing libpq.so.* that was installed earlier. We -# (re)install libpq5, recreate the helper symlink for PG ≤ 16, refresh -# the loader cache, and preload the client library so Citus never -# complains about symbol interposition. -# -------------------------------------------------------------------- -ARG PG_MAJOR -RUN set -eux; \ - # 2. Satisfy RUNPATH for PG 15/16 (harmless for ≥17) - ln -sf /usr/lib/x86_64-linux-gnu/libpq.so.5 \ - /usr/lib/postgresql/${PG_MAJOR}/lib/libpq.so.5; \ - \ - # 3. Refresh dynamic‑linker cache - echo "/usr/lib/x86_64-linux-gnu" > /etc/ld.so.conf.d/libpq.conf; \ - ldconfig - -# 4. Make sure the backend and Citus load the *same* libpq object -ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libpq.so.5 +# copy the collected files from the collection container at once into the final container +COPY --from=dev-tools-collection /collect/ / WORKDIR /home/circleci