Repository navigation
ci: install AMI postgres profile via nix-env --set - #2309
Merged
Merged
Conversation
PostgreSQL Extension Dependency Analysis: PR #2309
SummaryNo extensions had dependencies with MAJOR version updates. Full Analysis ResultsPostgreSQL 15 Extension DependenciesPostgreSQL 17 Extension DependenciesOrioleDB 17 Extension Dependencies |
brainrake
force-pushed
the
worktree-postgres-env-nix-set
branch
from
July 23, 2026 02:11
0f24caf to
6b01469
Compare
…file install Bundle psql/bin, pg_prove, supabase-groonga, and postgresql_src/_debug into a single postgres-*-profile derivation per major version, so the AMI build resolves and installs it with one nix-env --set instead of looping nix profile install over five separate flake attrs. Gatekeeper is not included here: it lives in the site-env-* profiles from #2283 instead, since it needs to roll out independently of a full AMI rebuild.
brainrake
force-pushed
the
worktree-postgres-env-nix-set
branch
from
July 23, 2026 02:16
5d6c4b9 to
1f57f4c
Compare
PostgreSQL Package Dependency Analysis: PR #2309
SummaryNo packages had MAJOR version updates. Full Analysis ResultsPostgreSQL 15 Dependency ChangesExtracting PostgreSQL 15 dependencies...
Runtime Closure Size
Raw Dependency ClosurePostgreSQL 17 Dependency ChangesExtracting PostgreSQL 17 dependencies...
Runtime Closure Size
Raw Dependency Closure |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…rofile.nix - Reformat the profile paths list per treefmt (pre-commit-run/treefmt-check were failing on all platforms). - Re-add gatekeeper (pam_jit_pg.so) to the profile for Linux, non-PG15 builds — it was dropped when the profile packages were introduced, which broke testinfra's test_jit_pam_module_installed for PG17/orioledb-17. - Move the postgres-profile package definitions into their own nix/packages/postgres-profile.nix, imported from default.nix, and rename postgres-<version>-profile to postgres-profile-<version>.
Temporary change to avoid colliding with real production version tags while manually triggering ami-release-nix.yml against this branch. Will be reverted once the AMI/smoke tests pass.
…erge Deliberately not adopting develop's version bump (.011/.158/.158) yet — the currently published AMIs are tagged with the old -site versions. Will switch to the real bumped versions once smoke tests against those AMIs pass.
The previous -site suffix broke platform's parseAMIVersion regex (expects a numeric 4th segment), causing every smoke test project to get stuck in COMING_UP regardless of engine/arch. Use an unused numeric patch number instead, consistent with the version format platform already parses correctly.
Renames nix/packages/postgres-profile.nix -> postgres-env.nix,
postgres-profile-{15,17,orioledb-17} packages -> postgres-env-*, and
updates ansible/tasks/stage2-setup-postgres.yml accordingly.
Collaborator
Author
|
Note: gatekeeper is baked into |
brainrake
marked this pull request as ready for review
July 31, 2026 02:02
brainrake
enabled auto-merge
August 20, 2026 10:19
mmlb
approved these changes
Aug 24, 2026
mmlb
left a comment
Collaborator
There was a problem hiding this comment.
couple of small nits that would be nice to have but not worth blocking, otherwise lgtm
| @@ -132,11 +135,6 @@ | |||
| - name: Install gatekeeper if not pg15 | |||
Collaborator
There was a problem hiding this comment.
Suggested change
| - name: Install gatekeeper if not pg15 | |
| - name: Setup gatekeeper |
| become: true | ||
| block: | ||
| - name: Install packages from nix binary cache | ||
| - name: Resolve postgres env store path |
Collaborator
There was a problem hiding this comment.
Suggested change
| - name: Resolve postgres env store path | |
| - name: Resolve postgres env from nix binary cache |
hunleyd
added a commit
that referenced
this pull request
Aug 25, 2026
…nix-pkg-for-pgbackrest * origin/develop: (26 commits) chore(nix): remove LLVM JIT support from postgresql build (#2296) fix: cover pg_cron legacy extversion strings with alignment migration and alias scripts (#2300) docs: commit supabase/postgres's CLAUDE.md (#2395) ansible: Setup swap in stage2 not stage1 (#2381) ci: install AMI postgres profile via nix-env --set (#2309) images: clean up nix at end of process (#2393) ansible: Stop compiling binaries (#2382) Report final AMI disk usage to workflow job (#2384) Re-organize build scripts, add to shellcheck (#2380) feat: Do not hardcode `orioledb.main_buffers` in `postgresql.conf` (#2365) feat: add orioledb debug symbols (#2379) chore: Make postgresql.env optional in database-optimizations.service (#2372) feat: bump to PostgREST v14.17 (#2374) ansible: Bump versions to get new AMIs built (#2376) Revert PostgREST bump to v14.17 (#2371) fix: disable APT timers during Supabase upgrades (#2358) gha/nix-install-ephemeral: Actually copy to s3, not just echo it (#2369) feat: bump to PostgREST v14.17 (#2363) feat: add guest-to-host time synchronisation (#2364) ci: Add final job that depends on the important jobs (#2361) ...
hunleyd
added a commit
that referenced
this pull request
Aug 25, 2026
…chiving-on-customer-tier * origin/develop: (26 commits) chore(nix): remove LLVM JIT support from postgresql build (#2296) fix: cover pg_cron legacy extversion strings with alignment migration and alias scripts (#2300) docs: commit supabase/postgres's CLAUDE.md (#2395) ansible: Setup swap in stage2 not stage1 (#2381) ci: install AMI postgres profile via nix-env --set (#2309) images: clean up nix at end of process (#2393) ansible: Stop compiling binaries (#2382) Report final AMI disk usage to workflow job (#2384) Re-organize build scripts, add to shellcheck (#2380) feat: Do not hardcode `orioledb.main_buffers` in `postgresql.conf` (#2365) feat: add orioledb debug symbols (#2379) chore: Make postgresql.env optional in database-optimizations.service (#2372) feat: bump to PostgREST v14.17 (#2374) ansible: Bump versions to get new AMIs built (#2376) Revert PostgREST bump to v14.17 (#2371) fix: disable APT timers during Supabase upgrades (#2358) gha/nix-install-ephemeral: Actually copy to s3, not just echo it (#2369) feat: bump to PostgREST v14.17 (#2363) feat: add guest-to-host time synchronisation (#2364) ci: Add final job that depends on the important jobs (#2361) ...
hunleyd
added a commit
that referenced
this pull request
Aug 25, 2026
…c-spool-path-defaults-onto-the-10gb-root-volume * origin/develop: chore(nix): remove LLVM JIT support from postgresql build (#2296) fix: cover pg_cron legacy extversion strings with alignment migration and alias scripts (#2300) docs: commit supabase/postgres's CLAUDE.md (#2395) ansible: Setup swap in stage2 not stage1 (#2381) ci: install AMI postgres profile via nix-env --set (#2309) images: clean up nix at end of process (#2393) ansible: Stop compiling binaries (#2382)
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.
Builds on #2283 (site-profiles).
Summary
postgres-env-{15,17,orioledb-17}packages (nix/packages/postgres-env.nix) that bundle everything the AMI build installs for the postgres user:psql_<v>/bin,pg_prove,supabase-groonga,postgresql_<v>_src,postgresql_<v>_debug(Linux only), andgatekeeper(Linux, non-PG15) forpam_jit_pg.so.nix-env --set, which is what gives it history/generations and a "latest" pointer.ansible/tasks/stage2-setup-postgres.yml: replace the 5-itemnix profile installloop withnix build --print-out-paths(registered) followed bynix-env --setto install the resolved env into the profile.Switching to
nix-env --setavoids mixingnix profile install's manifest format withnix-env's on the same default profile path.Test plan
nix eval .#packages.aarch64-darwin.postgres-env-{15,17,orioledb-17}.name— all three packages evaluatenix build .#postgres-env-{15,17,orioledb-17}— all three build successfully; verifiedbin/psql,bin/pg_provepresent,gatekeeper'spam_jit_pg.sopresent for 17/orioledb-17nix-env --profile <scratch> --set <resolved store path>— profile correctly set to a single new generation,psql --versionworks from ittest_jit_pam_module_installed(testinfra) passes for PG17/orioledb-17