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

nixos/postgresql: fix several issues #94454

Merged
merged 3 commits into from Aug 6, 2020
Merged

Conversation

@aanderse
Copy link
Contributor

aanderse commented Aug 1, 2020

Motivation for this change
  • stop "punishing" long time NixOS users (stateVersion 17.09 or below) by setting their dataDir to /var/db/postgresql even though it is their first time installing postgresql
  • realize we can't cover every possible scenario a sysadmin has for dataDir and only provision it when the default value is left (resolves #80827)
  • stop using deprecated PermissionsStartOnly (partial fix for #53852)
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@aanderse aanderse requested review from thoughtpolice, flokli, aszlig and danbst Aug 1, 2020
@aanderse
Copy link
Contributor Author

aanderse commented Aug 1, 2020

@GrahamcOfBorg test postgresql postgresql-wal-receiver

@aszlig
aszlig approved these changes Aug 1, 2020
Copy link
Member

aszlig left a comment

Thanks a lot.

I wonder whether we should move ExecStartPost out of the main unit into a separate unit, though, since using runuser to switch to the superuser screams "uuuugly!" to me :-D

@aanderse
Copy link
Contributor Author

aanderse commented Aug 1, 2020

Thanks a lot.

I wonder whether we should move ExecStartPost out of the main unit into a separate unit, though, since using runuser to switch to the superuser screams "uuuugly!" to me :-D

The scope of this PR is perfect in my opinion. I have 3 PRs to follow this one, 1 of which is doing exactly that 😄

@GrahamcOfBorg test postgresql postgresql-wal-receiver

@aanderse
Copy link
Contributor Author

aanderse commented Aug 4, 2020

I run a matrix-synapse server so I have an instance of postgresql I tested this against, all good for an existing install.

@Ma27 would you be able/willing to test this as well?

@Ma27
Ma27 approved these changes Aug 4, 2020
Copy link
Member

Ma27 left a comment

LGTM 👍

@aanderse aanderse force-pushed the aanderse:postgresql-cleanup branch from e514c06 to 2f06e80 Aug 5, 2020
@aanderse aanderse force-pushed the aanderse:postgresql-cleanup branch from 2f06e80 to 685a059 Aug 5, 2020
@aanderse aanderse force-pushed the aanderse:postgresql-cleanup branch 2 times, most recently from e88662a to e20667b Aug 5, 2020
@aanderse
Copy link
Contributor Author

aanderse commented Aug 5, 2020

@GrahamcOfBorg test postgresql postgresql-wal-receiver

@aanderse aanderse force-pushed the aanderse:postgresql-cleanup branch from e20667b to 882711b Aug 5, 2020
@Ma27
Ma27 approved these changes Aug 5, 2020
Copy link
Member

Ma27 left a comment

LGTM. Any additional comments? Otherwise I'd consider this mergable :)

nixos/doc/manual/release-notes/rl-2009.xml Outdated Show resolved Hide resolved
@aanderse aanderse force-pushed the aanderse:postgresql-cleanup branch from 882711b to f42f8a6 Aug 5, 2020
@flokli flokli merged commit 056bb77 into NixOS:master Aug 6, 2020
16 checks passed
16 checks passed
tests tests
Details
tests
Details
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f42f8a6"; rev="f42f8a6d3c59b483a649bf1e5910733396a45eb2"; } ./pkgs/t
Details
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f42f8a6"; rev="f42f8a6d3c59b483a649bf1e5910733396a45eb2"; } ./nixos/
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f42f8a6"; rev="f42f8a6d3c59b483a649bf1e5910733396a45eb2"; } ./nixos/
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f42f8a6"; rev="f42f8a6d3c59b483a649bf1e5910733396a45eb2"; } ./nixos/
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f42f8a6"; rev="f42f8a6d3c59b483a649bf1e5910733396a45eb2"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f42f8a6"; rev="f42f8a6d3c59b483a649bf1e5910733396a45eb2"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f42f8a6"; rev="f42f8a6d3c59b483a649bf1e5910733396a45eb2"; } ./pkgs/t
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@aanderse aanderse deleted the aanderse:postgresql-cleanup branch Aug 6, 2020
@bachp bachp mentioned this pull request Aug 6, 2020
3 of 10 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.