Skip to content
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

fix postgres tests and remove eol postgresql12 #1169

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions changelog.d/20241117_230848_HEAD_scriv.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!--

A new changelog entry.

Delete placeholder items that do not apply. Empty sections will be removed
automatically during release.

Leave the XX.XX as is: this is a placeholder and will be automatically filled
correctly during the release and helps when backporting over multiple platform
branches.

-->

### Impact

- Remove the postgresql12 role

### NixOS XX.XX platform

- Remove the postgresql12 role
2 changes: 0 additions & 2 deletions nixos/roles/postgresql.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ in

in {
flyingcircus.roles = {
postgresql12 = mkRole "12";
postgresql13 = mkRole "13";
postgresql14 = mkRole "14";
postgresql15 = mkRole "15";
Expand All @@ -26,7 +25,6 @@ in
config =
let
pgroles = with config.flyingcircus.roles; {
"12" = postgresql12.enable;
"13" = postgresql13.enable;
"14" = postgresql14.enable;
"15" = postgresql15.enable;
Expand Down
3 changes: 2 additions & 1 deletion nixos/services/postgresql/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ in {

systemd.services.postgresql.serviceConfig = {
Restart = "always";
ReadWritePaths = [ "/nix/var/nix/gcroots/per-user/postgres" ];
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to me, this raises the question, why exactly we are setting gcroots „manually“ and if we really need to do that. maybe @dpausp can provide some insight here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is done to keep around old postgresql versions during postgres updates. At start, each postgres verrsion registers itself in the postStart phase as a gcroot. Our fc-postgresql tooling cleans these gcroots after a successful update.

} // lib.optionalAttrs (lib.versionAtLeast cfg.majorVersion "12") {
RuntimeDirectory = "postgresql";
};
Expand Down Expand Up @@ -211,7 +212,7 @@ in {

flyingcircus.activationScripts = {
postgresql-srv = lib.stringAfter [ "users" "groups" ] ''
install -d -o postgres /srv/postgresql
install -d -o postgres /srv/postgresql/${cfg.majorVersion}
install -d -o postgres /nix/var/nix/gcroots/per-user/postgres
'';
};
Expand Down
3 changes: 0 additions & 3 deletions release/important_packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,21 +156,18 @@
"polkit",
"postfix",
"postgresqlPackages.postgis",
"postgresql12Packages.postgis",
"postgresql13Packages.postgis",
"postgresql14Packages.postgis",
"postgresql15Packages.postgis",
"postgresql16Packages.postgis",
"postgresql17Packages.postgis",
"postgresqlPackages.temporal_tables",
"postgresql12Packages.temporal_tables",
"postgresql13Packages.temporal_tables",
"postgresql14Packages.temporal_tables",
"postgresql15Packages.temporal_tables",
"postgresql16Packages.temporal_tables",
"postgresql17Packages.temporal_tables",
"postgresql",
"postgresql_12",
"postgresql_13",
"postgresql_14",
"postgresql_15",
Expand Down
Loading