Skip to content

fix(postgis): build from master with address_standardizer and tiger geocoder - #171

Merged
mnencia merged 6 commits into
mainfrom
fix/postgis-main
Nov 17, 2026
Merged

mnencia merged 6 commits into
mainfrom
fix/postgis-main

Conversation

@NiccoloFei

@NiccoloFei NiccoloFei commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

PostGIS 3.7.0 removed address_standardizer and postgis_tiger_geocoder from the main repository.

With the base images on the CNPG side now shipping 3.7.0, the upgrade tests were trying to upgrade from 3.7 to 3.6, which cannot work.

Go back to building PostGIS from master (reverting the stable-3.6 pin from #128) and build the two extensions from their new standalone repositories. address_standardizer is pinned to v3.7.0 until there is an upgrade path from v3 to v4.

Master needs newer GDAL libraries, so the PostGIS stage now enables the PGDG apt repository and installs libgdal39 from it. The repository is removed at the end of the stage. A final ldd check fails the build if the purge removes a library the extensions link against.

Also add git-clone-retry.sh and use it for the clones from non-GitHub remotes (git.postgresql.org, git.osgeo.org), as they can sometimes time out from GitHub runners.

The script and build-deps.txt are now bind-mounted into the RUN steps instead of copied, so they don't end up in the image.

@NiccoloFei
NiccoloFei requested a review from a team as a code owner November 12, 2026 16:27
…ocoder

PostGIS 3.7.0 removed address_standardizer and postgis_tiger_geocoder
from the main repository.

With the base images on the CNPG side now shipping 3.7.0, the upgrade
tests were trying to upgrade from 3.6 to 3.7.0, which cannot work.

Go back to building PostGIS from master (reverting the stable-3.6 pin
from #128) and build the two extensions from their new standalone
repositories.

Also add git-clone-retry.sh and use it for the clones from non-GitHub
remotes (git.postgresql.org, git.osgeo.org), as they can sometimes
time out from GitHub runners.

The script and build-deps.txt are now bind-mounted into the RUN steps
instead of copied, so they don't end up in the image.

Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Signed-off-by: Tao Li <tao.li@enterprisedb.com>
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
@NiccoloFei

Copy link
Copy Markdown
Contributor Author

@mnencia mnencia changed the title fix: build PostGIS from master with address_standardizer and tiger geocoder fix(postgis): build from master with address_standardizer and tiger geocoder Nov 17, 2026
The runtime libraries are pinned by soname. If PGDG bumps one, the
extensions link against the new version, the purge removes it, and the
image breaks at runtime while the build stays green. Run ldd on the
installed extension libraries after the purge and fail the build if a
dependency is missing.

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Five retries with a fixed 5 second delay all failed within 45 seconds
when git.postgresql.org dropped connections. Use 15 seconds multiplied
by the attempt number, so the script waits about 150 seconds in total
before giving up.

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
The build only needs the tip of the branch and its short commit hash.
A shallow clone transfers far less data, which makes it faster and less
exposed to connection drops from git.postgresql.org.

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
@mnencia
mnencia merged commit ca22033 into main Nov 17, 2026
12 checks passed
@mnencia
mnencia deleted the fix/postgis-main branch November 17, 2026 09:11
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.

3 participants