Skip to content

postgresql: 13.18 -> 13.20, 14.15 -> 14.17, 15.10 -> 15.12, 16.6 -> 16.8, 17.2 -> 17.4#382282

Merged
vcunat merged 7 commits intoNixOS:staging-nextfrom
Ma27:bump-postgresql
Feb 19, 2025
Merged

postgresql: 13.18 -> 13.20, 14.15 -> 14.17, 15.10 -> 15.12, 16.6 -> 16.8, 17.2 -> 17.4#382282
vcunat merged 7 commits intoNixOS:staging-nextfrom
Ma27:bump-postgresql

Conversation

@Ma27
Copy link
Member

@Ma27 Ma27 commented Feb 15, 2025

Closes #382032

https://www.postgresql.org/about/news/postgresql-173-167-1511-1416-and-1319-released-3015/

This only updates the server packages, hence this can go straight into master
Please note that the client update (#382032) is delayed due to a regression in the release (https://www.postgresql.org/about/news/out-of-cycle-release-scheduled-for-february-20-2025-3016/).

Backport to 24.11 must wait until then since we don't have a libpq package there.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@Ma27 Ma27 requested a review from wolfgangwalther February 15, 2025 10:31
@github-actions github-actions bot added 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. labels Feb 15, 2025
@wolfgangwalther
Copy link
Contributor

This only updates the server packages, hence this can go straight into master

We still have plenty of rebuilds because we haven't split off the postgresql test hook, yet. But certainly the rebuilds are a lot lower than before libpq.

@wolfgangwalther wolfgangwalther added the 1.severity: security Issues which raise a security issue, or PRs that fix one label Feb 15, 2025
@wolfgangwalther
Copy link
Contributor

Please note that the client update (#382032) is delayed due to a regression in the release (https://www.postgresql.org/about/news/out-of-cycle-release-scheduled-for-february-20-2025-3016/).

Since the postgresql package exposes psql and libpq as well, I assume that the regression potentially affects this PR as well.

We could probably just try to backport postgres/postgres@a92db3d for a week until the new release is out. We could do the same with libpq, but the usefulness depends a bit on the staging-next cycle.

@vcunat can we get #382032 into the current staging-next cycle? In that case we'd try to backpatch the commit above. If not, then we can also wait for the next release next week (which would probably be too late for staging-next).

Also, what about this PR - master, staging, staging-next? What are our options given https://www.postgresql.org/support/security/CVE-2025-1094/ ?

@Ma27
Copy link
Member Author

Ma27 commented Feb 15, 2025

Added a commit for the postgresqlTestHook issue, then we can try it out right here.

I decided to not fix up the VM tests (they will also build for postgresqlForTests right now) since this will resolve itself when the next staging cycle lands on master.

@wolfgangwalther
Copy link
Contributor

Added a commit for the postgresqlTestHook issue, then we can try it out right here.

From the libpq commit, I remember there were at least a few cases, where postgresqlTestHook and postgresql were added to the derivation. Those cases would not be caught by this change alone, but let's see how many rebuilds we get with this already :)

@wolfgangwalther
Copy link
Contributor

Hm, almost no change in rebuilds, yet:

Package: added 1, removed 0, changed 1866, Rebuild: linux 1865, darwin 1684

@github-actions github-actions bot added 6.topic: python Python is a high-level, general-purpose programming language. 6.topic: haskell General-purpose, statically typed, purely functional programming language labels Feb 15, 2025
@Ma27
Copy link
Member Author

Ma27 commented Feb 15, 2025

This push should bring it down a bit.
I left out psycopg2 sicne it seems to pull in postgresql entirely and I'll need to take a closer look. But got some other things to do first.

@wolfgangwalther
Copy link
Contributor

Almost no change at this stage, yet:

Package: added 1, removed 0, changed 1863, Rebuild: linux 1862, darwin 1682

I looked at the rebuilds a bit:

  • ~ 700 are from postgresql + extensions directly. That's the minimum any update to all major versions will always have.
  • A lot are python packages, which probably depend on psycopg2. psycopg2 needs to use both libpq and postgresqlForTests. Tested locally, works.
  • haskellPackages are not using libpq, yet. This needs a change to cabal2nix, I think.

The changes required for this will need to be made through staging, so I don't think we can bring down the rebuilds in this PR already.

@github-actions github-actions bot removed 6.topic: python Python is a high-level, general-purpose programming language. 6.topic: haskell General-purpose, statically typed, purely functional programming language labels Feb 16, 2025
@Ma27 Ma27 changed the base branch from master to staging-next February 16, 2025 18:46
@Ma27
Copy link
Member Author

Ma27 commented Feb 16, 2025

~ 700 are from postgresql + extensions directly. That's the minimum any update to all major versions will always have.

Yeah, right. A little more than I would've guessed :(

I removed the postgresqlForTests patch for now since it doesn't make a real difference.

@vcunat @mweinelt are you OK with staging-next? (~1.8k rebuilds for x86_64-linux - but will be more if we also do libpq here).

Re psql: I guess I'll apply the patch and pull the libpq update here, but this will have to wait until tomorrow.

@mweinelt
Copy link
Member

Yes, send it.

@mweinelt
Copy link
Member

@wolfgangwalther
Copy link
Contributor

Looks like the security fix introduced a regression.

Yes, we've been discussing this upthread a little bit and also in #382032.

The idea was to apply the patch to fix the regression, but at this stage we might just as well wait for the new release. While technically the release is made on Thursday, it should be "stamped" (tagged in git) later today already. So by tomorrow morning the latest we should be able to update to 17.4 etc. and be done with it afterwards.

@Ma27
Copy link
Member Author

Ma27 commented Feb 17, 2025

@wolfgangwalther @mweinelt I prepared the relevant changes yesterday (i.e. cherry-picking #382032 and applying the relevant fix), hence I just pushed it.

I'd be fine with both ways, i.e. waiting until the tag is there or going with it now.

@github-actions github-actions bot added 10.rebuild-darwin: 2501-5000 This PR causes many rebuilds on Darwin and should target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. and removed 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. labels Feb 17, 2025
@wolfgangwalther
Copy link
Contributor

Yeah, I guess that was my bad. I understood the time of the "Stamp" commit to be the time of "tag", but that's not true. They "stamped" the release: postgres/postgres@f8554de

But they didn't push the tarballs, yet, and didn't tag this commit, yet. This will happen Thursday.

What's the timeline for current staging-next?

With the stamp done, we could temporarily update to a specific git revision, it would still carry the right version number etc. - I can work on that immediately.

@vcunat
Copy link
Member

vcunat commented Feb 18, 2025

Timeline? I don't think it matters much. All linux binaries are ready now. So even if staging-next got merged to master before this PR, merging to master within days after that would be about the same in terms of rebuilds.

wolfgangwalther and others added 7 commits February 18, 2025 10:59
This allows us to fetch newer releases a few days before they are
officially released and the tarballs have been pushed.

The regular release cycle is like this:
- Sunday, the release notes are committed.
- Monday, the version is "stamped", i.e. the version bump committed.
- Thursday, the release is made.

There are not going to be any changes from Monday on, so we can kick off
our builds at that time already - they still need time to hit unstable
anyway.
@wolfgangwalther
Copy link
Contributor

wolfgangwalther commented Feb 18, 2025

I just pushed updates to the stamped new version by commit rev to this PR (I hope you don't mind pushing to your PR, @Ma27).

We can either go ahead with this now, and then change back to the tag (with the same underlying commit) later this week, or we can wait until the tag appears.

I must admit I still don't understand the whole picture of "why and which rebuilds really matter for a merge to master", and I also don't really know what the implications of both would be in terms of "when will this update hit unstable". So I can't really make the best judgment of the practicality of each approach.

Edit: We should also think about the best course of action for backporting. Can we do this in one go to release-24.11 or do we need to go through staging there as well?

@wolfgangwalther wolfgangwalther marked this pull request as ready for review February 18, 2025 10:29
@nix-owners nix-owners bot requested a review from thoughtpolice February 18, 2025 10:30
@wolfgangwalther wolfgangwalther changed the title postgresql: 13.18 -> 13.19, 14.15 -> 14.16, 15.10 -> 15.11, 16.6 -> 16.7, 17.2 -> 17.3 postgresql: 13.18 -> 13.20, 14.15 -> 14.17, 15.10 -> 15.12, 16.6 -> 16.8, 17.2 -> 17.4 Feb 18, 2025
@vcunat vcunat merged commit b2aa306 into NixOS:staging-next Feb 19, 2025
47 checks passed
@Ma27 Ma27 deleted the bump-postgresql branch February 19, 2025 09:57
@Ma27
Copy link
Member Author

Ma27 commented Feb 19, 2025

I hope you don't mind pushing to your PR, @Ma27

All good, would've done the same @wolfgangwalther :)

Can we do this in one go to release-24.11 or do we need to go through staging there as well?

staging given the amount of rebuilds.
I'll hopefully get to it this afternoon.

@wolfgangwalther
Copy link
Contributor

staging given the amount of rebuilds.
I'll hopefully get to it this afternoon.

If we go staging for 24.11, we should certainly wait for the the tags to appear tomorrow, so we don't have to touch it twice. There will certainly not be a difference for how fast this reaches release-24.11.

@vcunat
Copy link
Member

vcunat commented Feb 20, 2025

@wolfgangwalther
Copy link
Contributor

aarch64-darwin is in trouble: https://hydra.nixos.org/eval/1812132?filter=postgresql_&compare=1812115

Yeah, pretty sure this will be #371242 coming to aarch64-darwin now. We haven't found a solution to this in a while, I doubt I can find one on the spot. But there is #383377, which is at least related - maybe that will help, will look into this today.

It certainly worked fine when I built the PR on the community builder, so the failures are not entirely predictable.

@vcunat
Copy link
Member

vcunat commented Feb 20, 2025

The build passes for me. Maybe it really is flaky.

@wolfgangwalther
Copy link
Contributor

wolfgangwalther commented Feb 20, 2025

staging given the amount of rebuilds.
I'll hopefully get to it this afternoon.

If we go staging for 24.11, we should certainly wait for the the tags to appear tomorrow, so we don't have to touch it twice. There will certainly not be a difference for how fast this reaches release-24.11.

I opened #383713 to replace the commits from here with the now pushed tags.

@Ma27 are you going to do the backport?

I'll look into the darwin issue now. Edit: Seems like that was resolved by retriggering the flaky build, at least for now.

@wolfgangwalther
Copy link
Contributor

The build passes for me. Maybe it really is flaky.

Pretty sure I know why this happens now: #371242 (comment)

If this comes up, the build needs to happen on a different builder, or manual intervention on the builder is required to clean those shared memory segments up - until we can figure out how to prevent that from happening...

@Ma27
Copy link
Member Author

Ma27 commented Feb 20, 2025

@Ma27 are you going to do the backport?

Will do so tomorrow.

Ma27 pushed a commit that referenced this pull request Feb 21, 2025
We had set the "stamped" commit in #382282, a few days before the tags
appeared. The tags are now there, so we can replace them. The hashes
stay the same.
Ma27 pushed a commit to Ma27/nixpkgs that referenced this pull request Feb 21, 2025
We had set the "stamped" commit in NixOS#382282, a few days before the tags
appeared. The tags are now there, so we can replace them. The hashes
stay the same.

(cherry picked from commit 4579b6b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.severity: security Issues which raise a security issue, or PRs that fix one 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 2501-5000 This PR causes many rebuilds on Darwin and should target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants