nixpkgs/nixos
Danylo Hlynskyi 5443eee47c
nixos/postgresql: support 0750 for data directory (#65245)
* nixos/postgresql: support 0750 for data directory

This is rework of part of https://github.com/NixOS/nixpkgs/pull/46670.
My usecase was to be able to inspect PG datadir as wheel user.

PG11 now allows starting server with 0750 mask for data dir.
`groupAccess = true` now does this automatically. The only thing you have to do
is to set group ownership.

For PG10 and below, I've described a hack how this can be done. Before this PR
hack was impossible. The hack isn't ideal, because there is short
period of time when dir mode is 0700, so I didn't want to make it official.

Test/example is present too.

* postgresql: allow changing initidb arguments via module system

Closes https://github.com/NixOS/nixpkgs/issues/18829

+ some cleanups

* addressed review comments and some fixes

* whoops

* change groupAccess to tristate, to not force `chmod` on dataDir.

Making mask either 0700 or 0750 is too restrictive..

* WIP

* let's not support group mode for versions pre-11.

The only fix is to change mode to 0700 before start, because otherwise postgresql
doesn't start, and error is non-obvious.
2020-02-14 20:51:20 +02:00
..
doc rl-2009: typo 2020-02-10 14:23:00 -05:00
lib Merge pull request #79659 from worldofpeace/cleanup-python-test-lib 2020-02-14 12:38:57 -05:00
maintainers maintainers/create-azure.sh: run from anywhere 2020-01-09 20:54:28 +00:00
modules nixos/postgresql: support 0750 for data directory (#65245) 2020-02-14 20:51:20 +02:00
tests let's not support group mode for versions pre-11. 2020-02-14 19:16:34 +02:00
COPYING
default.nix
README
release-combined.nix nixos/tests/firefox: support running the test with the firefox ESR version 2020-02-11 08:58:13 +01:00
release-small.nix nixos/containers-ip: Test both ipv4 and ipv6 in the same script 2019-11-27 09:13:02 +01:00
release.nix nixos/release.nix: Import './..' instead of nixpkgs 2020-02-12 22:44:59 +01:00

*** NixOS ***

NixOS is a Linux distribution based on the purely functional package
management system Nix.  More information can be found at
http://nixos.org/nixos and in the manual in doc/manual.