Repository navigation
build-pg-focal: take the patch series from PGDG's packaging of the same minor - #1244
Open
Kemal Büyükkaya (kemalbuyukkaya) wants to merge 1 commit into
Open
Kemal Büyükkaya (kemalbuyukkaya) wants to merge 1 commit into
Kemal Büyükkaya (kemalbuyukkaya) wants to merge 1 commit into
Conversation
…me minor
The build reused the frozen focal debian/ packaging wholesale, including its
patch series, which stops at the last focal minor (13.21/14.18/15.13/16.9).
So our newer minors drifted from what PGDG ships for them:
* 14.24/15.19/16.15 lacked PGDG's psql fix for the COPY FROM STDIN
regression in those minors: psql -c "SELECT 1; COPY t FROM STDIN"
aborted with "unexpected COPY_IN result, aborting connection".
* 16.x still carried v8-0001-Fix-recovery-conflict-SIGUSR1-handling
(an unmerged core-server rework) and pgstat-report-conflicts-
immediately, which PGDG dropped in 16.10 as s390x workarounds.
PGDG's patch series is identical across distros for a given minor, so take
debian/patches from their jammy packaging of the minor we build, verified
against its .dsc. The rest of the frozen focal debian/ stays, keeping
LLVM 10. PG_DROP_PATCHES no longer needs a default (hurd-iovec is not in
the current series).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The patch selection, checksum verification, extraction, and existing build flow are consistent and complete.
0 open findings
What changed in this PR
Updates focal PostgreSQL builds to use PGDG’s patch series for the matching minor release.
Changes:
- Downloads and verifies Jammy patch packaging.
- Preserves optional patch exclusions and records the source in the changelog.
- Documents the revised packaging strategy.
| File | Description |
|---|---|
scripts/build_pg_focal |
Replaces frozen patches with the verified matching PGDG series. |
dockerfiles/focal-pg-builder/Dockerfile |
Documents the patch source. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The focal build combines a new upstream minor with PGDG's frozen focal
debian/packaging, including its patch series. That series stops at the last focal minor (13.21 / 14.18 / 15.13 / 16.9 / 17.5), but PGDG kept changing patches for later minors. Compared with what PGDG ships today for the same minors:v2-0001-psql-count-every-COPY-FROM-STDIN…: fixes a psql regression in 14.24/15.19/16.15 wherepsql -c "SELECT 1; COPY t FROM STDIN"aborts withunexpected COPY_IN result, aborting connectionv8-0001-Fix-recovery-conflict-SIGUSR1-handling(an unmerged rewrite of core server code) andpgstat-report-conflicts-immediately. PGDG dropped both in 16.10 as s390x workarounds.jit-s390x,focal-arm64-outline-atomics(both do nothing on amd64)Everything else matches PGDG. A rebuild of 16.9 compared against PGDG's own 16.9 focal debs showed identical configure/compiler flags, gcc 9.4, LLVM 10, dependencies, file lists and hardening.
Fix
In step [3/6] of
scripts/build_pg_focal, replacedebian/patcheswith the series from PGDG's jammy packaging of the minor being built (live pool). The tarball's sha256 is checked against its.dsc. PGDG's series is byte-identical across all its distros for a given minor, so jammy works as the source. The rest of the frozen focaldebian/stays, so the LLVM 10 strategy is unchanged.PG_DROP_PATCHESstays as an override, but no longer needs a default (hurd-iovecisn't in the current series).Validation
Ran locally with podman, using the image built from
dockerfiles/focal-pg-builder:-focal-arm64-outline-atomics -jit-s390x+v2-0001-psql-…-hurd-iovec -v8-0001-… -pgstat-report-conflicts-immediatelypsql -c 'SELECT 1; COPY t FROM STDIN'loads its rows on 13.23/14.24/15.19/16.15. The currently shipped 16.15 build (run 37928058376) fails withunexpected COPY_IN result.scripts/smoke_test_focal_debspasses on the combined 13–16 set (59 packages, 4 clusters, JIT available on all).RUN_TESTS=1(combined with build-pg-focal: build unprivileged so RUN_TESTS=1 can run initdb #1243): the full upstream test suite passes, including the 9 new psql COPY TAP checks from PGDG's patch.Independent of #1243; they touch different parts of the script.