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 2 commits into
Open
Kemal Büyükkaya (kemalbuyukkaya) wants to merge 2 commits into
Kemal Büyükkaya (kemalbuyukkaya) wants to merge 2 commits into
Conversation
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.
…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>
The workflow only ran on push to pg-focal (and on dispatch), so pushes to a PR branch that changes the focal build never exercised it. Also run it for pull requests touching the workflow, scripts/build_pg_focal, scripts/smoke_test_focal_debs or dockerfiles/focal-pg-builder/. Such runs build the default 13-16 matrix at the latest minors, without tests. Fork PRs get no Docker Hub or signing secrets, so they skip the run. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Kemal Büyükkaya (kemalbuyukkaya)
force-pushed
the
users/kbuyukkaya/align-pg-focal-patches-with-pgdg
branch
from
November 18, 2026 14:13
7c7f843 to
84a2815
Compare
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.
Why the patch series matters
We don't ship plain upstream PostgreSQL. Our packages carry PGDG's version string (
16.16-1.pgdg20.04+1), so they have to behave exactly like PGDG's.debian/patchesis what makes PostgreSQL fit Debian/Ubuntu. Without it, from a user's point of view:assemblejob's combined 13–16 set relies on.postgresql-commonlisten in/var/run/postgresql, but plain psql looks in/tmp.extension_destdirsetting to test before installing.The series depends on the minor being built, not on the distro: for each of 13.23 / 14.25 / 15.20 / 16.16, PGDG's series is byte-identical for bookworm, trixie, jammy and noble. A new minor can shift code under a patch, make one obsolete, or need a new fix, so PGDG adjusts the series every release.
Problem
The focal build combines a new upstream minor with PGDG's frozen focal
debian/packaging, including its patch series. That series comes from the last focal minor PGDG built (e.g. 16.9 for PG16), so it falls behind as PGDG keeps adjusting it. For the current minors, we still apply patches PGDG no longer ships:focal-arm64-outline-atomics,jit-s390x(no effect on amd64)v8-0001-Fix-recovery-conflict-SIGUSR1-handling(an unmerged rewrite of core server code) andpgstat-report-conflicts-immediately, both s390x workaroundsSo our PG16 server runs code that PGDG's 16.16 doesn't. If PGDG adds a fix patch in a later minor, the frozen series misses it too.
Fix
Patch series. 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. The rest of the frozen focaldebian/stays, so the LLVM 10 strategy is unchanged.PG_DROP_PATCHESstays as an override, but no longer needs itshurd-iovecdefault (that patch isn't in PGDG's series anymore).CI trigger.
build-pg-focal.ymlonly ran on push topg-focal(and on dispatch), so pushes to a PR like this one never exercised it. It now also runs for pull requests that touch the workflow,scripts/build_pg_focal,scripts/smoke_test_focal_debsordockerfiles/focal-pg-builder/. These runs build the default 13–16 matrix at the latest minors, without tests. Fork PRs are skipped (no Docker Hub / signing secrets).Validation (13.23 / 14.25 / 15.20 / 16.16)
PR-triggered CI (run 44321965761, started by this PR's push): each major uses PGDG's jammy series for the same minor, and it applies with zero fuzz. 23 signed debs per major, JIT on
libllvm10. The combined 59-package set installs in stockubuntu:20.04, with 4 clusters online and JIT available on all.run_tests=1(run 44322050496): the full upstream test suite passes on every major, with 0 failures. The onlynot oklines are upstream# TODOtests.Patch series: compared with the frozen series, the only change is that the patches in the table above are gone (plus
hurd-iovecon 16). PGDG'sextension_destdiris rebased for 14–16, but only its context changed; the code it adds is identical.PG16 server: exports upstream's
RecoveryConflictInterrupt, not the v8 patch'sHandleRecoveryConflictInterrupt.