Skip to content

2 feature implement multiple versions of postgres#3

Merged
ruxwez merged 3 commits intomainfrom
2-feature-implement-multiple-versions-of-postgres
Oct 23, 2025
Merged

2 feature implement multiple versions of postgres#3
ruxwez merged 3 commits intomainfrom
2-feature-implement-multiple-versions-of-postgres

Conversation

@ruxwez
Copy link
Owner

@ruxwez ruxwez commented Oct 23, 2025

This pull request refactors the build and extension installation process for the PostgreSQL Docker image, moving extension installation logic from shell scripts in the Dockerfile to a Rust binary. It also updates the CI workflow to build and push images for multiple PostgreSQL versions, removes legacy files and documentation, and simplifies repository structure. The changes improve maintainability, parallelize extension installation, and support multi-architecture builds.

Build and Extension Installation Refactor

  • Replaced manual shell-based extension installation in Dockerfile with a Rust binary (install-extensions) that installs postgis, pgvector, and pgmq extensions in parallel, handles cleanup, and supports multiple PostgreSQL versions. (Dockerfile, Cargo.toml, src/main.rs, src/common.rs, src/extensions/mod.rs, src/extensions/postgis.rs, src/extensions/pgvector.rs, src/extensions/pgmq.rs) [1] [2] [3] [4] [5] [6] [7] [8]

Continuous Integration and Multi-Version Support

  • Added new GitHub Actions workflow (docker-build.yml) to build and push images for a matrix of PostgreSQL versions and architectures, replacing the previous static workflow. (.github/workflows/docker-build.yml, .github/workflows/docker-image.yml) [1] [2]

Repository Cleanup and Simplification

  • Removed legacy documentation files (README.md, ADDING_VERSIONS.md), the Makefile, docker-compose.yml, and initialization scripts, reflecting the move to a programmatic and CI-driven build process. (README.md, ADDING_VERSIONS.md, Makefile, docker-compose.yml, init.sql) [1] [2] [3] [4] [5]

Development Environment Adjustments

  • Updated .dockerignore to exclude additional editor and build directories for cleaner builds. (.dockerignore)

Add a Rust 'install-extensions' binary and use a multi-stage Dockerfile
to build it and run it during the image build. The installer builds and
installs pgvector, pgmq and PostGIS in parallel.

Remove legacy files: GitHub Actions workflow, Makefile, README,
docker-compose.yml, init.sql and ADDING_VERSIONS.md. Update
.dockerignore, add .gitignore, and add Cargo.toml/Cargo.lock and new
src/ modules for extension installation.
Remove get_latest_tag helper; add EXTENSION_VERSION constants for pgmq,
pgvector and postgis and clone specific tags. Run blocking shell
commands inside spawn_blocking for async tasks. Make postgis.install
synchronous and invoke it directly before starting other installs.
@ruxwez ruxwez linked an issue Oct 23, 2025 that may be closed by this pull request
@ruxwez ruxwez merged commit 5c3f84e into main Oct 23, 2025
0 of 5 checks passed
@ruxwez ruxwez deleted the 2-feature-implement-multiple-versions-of-postgres branch October 23, 2025 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Implement multiple versions of postgres

1 participant