-
-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
postgresql: 16.4 -> 17.0 #345260
base: staging
Are you sure you want to change the base?
postgresql: 16.4 -> 17.0 #345260
Conversation
I can't nearly complete a run of it, though, without crashing my machine. I would love to have a way to only test direct reverse dependencies of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this overwrite be in python-packages.nix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, is there some consensus on what's preferred?
I'm somewhat indifferent on that since I can see reasons for both styles (explicitness for what's required and less error-prone backports[1] vs more unneeded changes to a file and weird-looking code if you ever have a reason to use an older version (postgresql_16 = postgresql_15;
or whatever)).
[1] If the default postgresql is older on stable, a naive backport will leave a broken package even though the attribute of the newer package is available just not the default. Running into this regularly with Go stuff.
That is not expected.
We could do a hydra jobset but how do you assess the situation outside of postgres extensions: Are there expected to be many breakages? |
fwiw it's on my radar and I'll try to give a review soonish! |
Is this being held because some packages are being broken? Would it make sense to release 17.0 but still keep 16.x as the default, and resolving the issues when promoting the default from 16 to 17? This would allow others to start using 17.0 and possibly also find any issues with it and other packages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently fails for me with
postgresql> applying patch /nix/store/4gn6alxx0i0h61bdx1cfq217gqmc4q6x-b27622c90869aab63cfe22159a459c57768b0fa4.patch
postgresql> patching file src/test/regress/expected/date.out
postgresql> Reversed (or previously applied) patch detected! Assume -R? [n]
postgresql> Apply anyway? [n]
postgresql> Skipping patch.
postgresql> 3 out of 3 hunks ignored -- saving rejects to file src/test/regress/expected/date.out.rej
postgresql> patching file src/test/regress/expected/horology.out
postgresql> Reversed (or previously applied) patch detected! Assume -R? [n]
postgresql> Apply anyway? [n]
postgresql> Skipping patch.
postgresql> 9 out of 9 hunks ignored -- saving rejects to file src/test/regress/expected/horology.out.rej
postgresql> patching file src/test/regress/expected/timestamptz.out
postgresql> Reversed (or previously applied) patch detected! Assume -R? [n]
postgresql> Apply anyway? [n]
postgresql> Skipping patch.
postgresql> 13 out of 13 hunks ignored -- saving rejects to file src/test/regress/expected/timestamptz.out.rej
postgresql> patching file src/test/regress/pg_regress.c
postgresql> Reversed (or previously applied) patch detected! Assume -R? [n]
postgresql> Apply anyway? [n]
postgresql> Skipping patch.
postgresql> 1 out of 1 hunk ignored -- saving rejects to file src/test/regress/pg_regress.c.rej
postgresql> patching file src/test/regress/sql/horology.sql
postgresql> Reversed (or previously applied) patch detected! Assume -R? [n]
postgresql> Apply anyway? [n]
postgresql> Skipping patch.
postgresql> 1 out of 1 hunk ignored -- saving rejects to file src/test/regress/sql/horology.sql.rej
postgresql> patching file src/test/regress/sql/timestamptz.sql
postgresql> Reversed (or previously applied) patch detected! Assume -R? [n]
postgresql> Apply anyway? [n]
postgresql> Skipping patch.
postgresql> 1 out of 1 hunk ignored -- saving rejects to file src/test/regress/sql/timestamptz.sql.rej
I excluded the patch with the below diff but now disallowed reference complains about some -dev packages leaking into bin/postgres diff --git a/pkgs/servers/sql/postgresql/generic.nix b/pkgs/servers/sql/postgresql/generic.nix
index 90306fa3f5e8..d709cab1243a 100644
--- a/pkgs/servers/sql/postgresql/generic.nix
+++ b/pkgs/servers/sql/postgresql/generic.nix
@@ -79,7 +79,8 @@
disallowedRequisites = [
stdenv'.cc
] ++ (
- map lib.getDev (builtins.filter (drv: drv ? "dev") finalAttrs.buildInputs)
+ # map lib.getDev (builtins.filter (drv: drv ? "dev") finalAttrs.buildInputs)
+ []
) ++ lib.optionals jitSupport [
llvmPackages.llvm.out
];
@@ -170,7 +171,7 @@
})
# TODO: Remove this with the next set of minor releases
- (fetchpatch (
+ (if olderThan "17" then fetchpatch (
if atLeast "14" then {
url = "https://github.com/postgres/postgres/commit/b27622c90869aab63cfe22159a459c57768b0fa4.patch";
hash = "sha256-7G+BkJULhyx6nlMEjClcr2PJg6awgymZHr2JgGhXanA=";
@@ -183,7 +184,7 @@
url = "https://github.com/postgres/postgres/commit/205813da4c264d80db3c3215db199cc119e18369.patch";
hash = "sha256-L8/ns/fxTh2ayfDQXtBIKaArFhMd+v86UxVFWQdmzUw=";
excludes = [ "doc/*" ];
- })
+ }) else {}
)
] ++ lib.optionals stdenv'.hostPlatform.isMusl (
# Using fetchurl instead of fetchpatch on purpose: https://github.com/NixOS/nixpkgs/issues/240141 |
Did that in #351253 targeting the master branch. Once that is merged, I'll rebase this branch to only contain updating
Ah, yeah, that happened when testing against an older master branch and then opening the PR against staging... fixed in #351253.
My diff in #351253 looks slightly different and I never got those reference errors. |
Converted to draft until pg17 is merged into master and master into staging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the stuff was reviewed already and the rest is also looking good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, is there some consensus on what's preferred?
I'm somewhat indifferent on that since I can see reasons for both styles (explicitness for what's required and less error-prone backports[1] vs more unneeded changes to a file and weird-looking code if you ever have a reason to use an older version (postgresql_16 = postgresql_15;
or whatever)).
[1] If the default postgresql is older on stable, a naive backport will leave a broken package even though the attribute of the newer package is available just not the default. Running into this regularly with Go stuff.
3fafb7c
to
e8e741d
Compare
Rebased, this now only contains the changes to move
Still no change. About 5000 packages need to be rebuilt and eventually memory usage is so high, that sway becomes entirely unresponsive. I tried disabling swap, no difference. I also tried disabling memory overcommit - but that will just prevent nix from building much earlier, because it can't allocate memory. Not sure what's going on. I am now trying again by moving
There shouldn't be many, I guess. The majority of libpq users should just keep working. The blast radius might be higher, because of reverse dependencies, though. Most packages using libpq directly would be some kind of drivers, so they would affect a lot of packages. Once those build successfully... everything behind that should not be a problem anymore. It would be great if I am currently testing whether |
e8e741d
to
759ea92
Compare
All the three broken packages I knew about work now. I am still running tests to find others. |
ofborg eval fails for unrelated reasons, but I won't rebase right now, because I don't want to rebuild the world again during my tests... |
We are in feature freeze, so this will not be merged until after 24.11 |
I know and agree. |
sorry, i just realised that staging will not make it to 24.11 anyways, ignore my comment |
This release supports PostgreSQL 17. https://github.com/MagicStack/asyncpg/releases/tag/v0.30.0
As discussed in [1] this change is decoupled from the major version update for the NixOS postgresql module. [1]: https://github.com/NixOS/nixpkgs/pull/329611/files#r1701393693
759ea92
to
6336ff4
Compare
I have now built all direct reverse dependencies (by grepping for postgresql and building those packages) and found only one breaking package which I fixed ( This should be good from my side. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to #339153 there's a final staging-next cycle starting on Nov 6. This means that staging will be merged into staging-next then and we'd end up with the bump in 24.11. Hence blocking.
Code-wise it looks good and the touched packages build for me, so I'd merge right after that.
Description of changes
PostgreSQL 17 has been released.
This PR adds the new major version and then updates the
postgresql
package to it. The module's default version is unchanged as discussed in #329611 (comment).What I did so far:
python3Packages.asyncpg
at v16. (still running)I did all this by cherry-picking the commits here on master.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.