Conversation
Co-authored-by: mfa777 <2765931+mfa777@users.noreply.github.com>
Co-authored-by: mfa777 <2765931+mfa777@users.noreply.github.com>
Co-authored-by: mfa777 <2765931+mfa777@users.noreply.github.com>
Co-authored-by: mfa777 <2765931+mfa777@users.noreply.github.com>
Co-authored-by: mfa777 <2765931+mfa777@users.noreply.github.com>
Co-authored-by: mfa777 <2765931+mfa777@users.noreply.github.com>
Update WAL-G asset selection and gate VectorChord setup
Co-authored-by: mfa777 <2765931+mfa777@users.noreply.github.com>
Co-authored-by: mfa777 <2765931+mfa777@users.noreply.github.com>
…pport Add ParadeDB `pg_search` extension support to PostgreSQL image
There was a problem hiding this comment.
Pull request overview
This PR updates the project’s PostgreSQL + WAL-G Docker setup to add built-in support for ParadeDB’s pg_search and VectorChord (vchord) extensions, improve multi-architecture wal-g installation, and streamline runtime configuration via a .env file and container healthchecks.
Changes:
- Update wal-g version and add architecture-aware download logic in both postgres and backup images.
- Install
pg_searchandvchordinto the postgres image and add anENABLE_VCHORDentrypoint toggle to configure preload/extension creation. - Switch docker-compose service env management to
.envand add healthchecks; update docs and offline tests accordingly.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
Dockerfile.postgres-walg |
Updates wal-g install and adds pg_search/vchord installation steps. |
Dockerfile.backup |
Updates wal-g install logic for multi-arch backup container. |
scripts/docker-entrypoint-walg.sh |
Adds ENABLE_VCHORD logic to configure preload/extension at runtime. |
docker-compose.yml |
Replaces inline env vars with env_file: .env and adds healthchecks. |
docs/env_vars.json |
Adds ENABLE_VCHORD to the env var catalog. |
docs/ENV_VARS.md |
Documents ENABLE_VCHORD in the generated/synced env var table. |
test/test-offline-e2e.sh |
Adds an offline integration check for pg_search install presence in the Dockerfile. |
README.org |
Notes built-in pg_search support in the feature list. |
postgresql.conf.template |
Minor formatting/line adjustments. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| @@ -25,14 +30,21 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ | |||
| # Download and install wal-g | |||
| RUN set -eux; \ | |||
| echo "Downloading wal-g version ${WALG_VERSION}..."; \ | |||
| wget --no-check-certificate -O /tmp/wal-g.tar.gz "https://github.com/wal-g/wal-g/releases/download/${WALG_VERSION}/wal-g-pg-ubuntu-20.04-amd64.tar.gz"; \ | |||
| arch="$(dpkg --print-architecture)"; \ | |||
| case "${arch}" in \ | |||
| amd64) walg_arch="amd64" ;; \ | |||
| arm64) walg_arch="aarch64" ;; \ | |||
| *) echo "Unsupported architecture: ${arch}"; exit 1 ;; \ | |||
| esac; \ | |||
| walg_asset="wal-g-pg-${WALG_OS}-${walg_arch}.tar.gz"; \ | |||
| wget -O /tmp/wal-g.tar.gz "https://github.com/wal-g/wal-g/releases/download/${WALG_VERSION}/${walg_asset}"; \ | |||
| echo "Extracting wal-g..."; \ | |||
| cd /tmp && tar -tzf wal-g.tar.gz; \ | |||
| tar -xzf /tmp/wal-g.tar.gz -C /usr/local/bin; \ | |||
| ls -la /usr/local/bin/wal-g* || echo "No wal-g found after extraction"; \ | |||
| # Rename the extracted binary to just 'wal-g' \ | |||
| if [ -f /usr/local/bin/wal-g-pg-ubuntu-20.04-amd64 ]; then \ | |||
| mv /usr/local/bin/wal-g-pg-ubuntu-20.04-amd64 /usr/local/bin/wal-g; \ | |||
| if [ -f "/usr/local/bin/wal-g-pg-${WALG_OS}-${walg_arch}" ]; then \ | |||
| mv "/usr/local/bin/wal-g-pg-${WALG_OS}-${walg_arch}" /usr/local/bin/wal-g; \ | |||
There was a problem hiding this comment.
WALG_OS defaults to 20.04, which makes the wal-g asset/binary name wal-g-pg-20.04-… (see walg_asset and the subsequent rename check). wal-g release artifacts have historically included the distro prefix (e.g. wal-g-pg-ubuntu-20.04-…), so this is very likely to 404 and/or fail the rename step. Consider either defaulting WALG_OS to the full tag used by upstream assets (e.g. including ubuntu-) or renaming the arg to reflect the expected upstream naming.
There was a problem hiding this comment.
@copilot open a new pull request to apply changes based on this feedback
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This pull request enhances the PostgreSQL setup by updating dependencies, adding built-in support for ParadeDB's
pg_searchand VectorChord (vchord) extensions, and improving architecture compatibility for the wal-g backup tool. It also simplifies environment variable management and introduces health checks for better reliability.Dependency and compatibility improvements:
v3.0.8and improved architecture detection for bothDockerfile.backupandDockerfile.postgres-walg, allowing support foramd64andaarch64builds. [1] [2] [3]Extension support enhancements:
vchord) and ParadeDBpg_searchextensions inDockerfile.postgres-walg, with robust OS/architecture handling and fallback logic for ParadeDB package selection.ENABLE_VCHORDenvironment variable and automated preload/extension setup for VectorChord indocker-entrypoint-walg.sh, including documentation updates indocs/env_vars.json,docs/ENV_VARS.md, andREADME.org. [1] [2] [3] [4]Operational improvements:
docker-compose.ymlwith a.envfile for easier management, and added health checks for bothpostgresandbackupservices to improve reliability and monitoring. [1] [2] [3]Testing and documentation:
These changes collectively make the PostgreSQL setup more robust, extensible, and easier to operate in modern environments.