nixpkgs/pkgs
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
..
applications verilator: 4.026 -> 4.028 2020-02-14 12:13:04 -06:00
build-support build-fhs-userenv: runCommand -> runCommandLocal (#77253) 2020-02-14 20:16:49 +02:00
common-updater
data Merge pull request #79756 from rnhmjoj/profont 2020-02-14 19:49:31 +01:00
desktops Merge pull request #79780 from mkg20001/ge 2020-02-12 22:34:20 -05:00
development Merge pull request #80107 from phryneas/fix-build-tools 2020-02-14 13:35:04 -05:00
games Merge pull request #79935 from mmahut/ezquake 2020-02-14 09:47:48 +01:00
misc treewide: change fetchCargoTarball default to opt-out 2020-02-13 22:41:37 -08:00
os-specific linuxPackages.wireguard: 0.0.20200205 -> 0.0.20200214 2020-02-14 17:16:10 +01:00
servers nixos/postgresql: support 0750 for data directory (#65245) 2020-02-14 20:51:20 +02:00
shells treewide: change fetchCargoTarball default to opt-out 2020-02-13 22:41:37 -08:00
stdenv
test
tools Merge pull request #80116 from r-ryantm/auto-update/chezmoi 2020-02-14 08:39:58 -08:00
top-level Merge pull request #79756 from rnhmjoj/profont 2020-02-14 19:49:31 +01:00