Description of problem: unsetting shmmax in sysctl lead to having other programs like postgresql failing (see bug #1039616). Other distributions (RHEL for example, see bug #660036) set shmmax and shmall to the theoretical limit of the architecture as default. Fedora should do the same.
In ideal case defaults should be set directly in kernel. Otherwise /lib/sysctl.d/50-default.conf is own by systemd. So lets try kernel first.
(In reply to Lukáš Nykrýn from comment #1) > In ideal case defaults should be set directly in kernel. Otherwise > /lib/sysctl.d/50-default.conf is own by systemd. So lets try kernel first. The problem with ideal cases is it depends on whose ideals you're talking about. The default can depend on various things, so we're left with setting it via sysctl.
Any progress here?
Either the the current default makes sense, and we leave the kernel as it is, or it makes no sense and the kernel should change. Systemd has no business to overwrite the kernel here. The rules for the kernel and systmed in that regard are the same; both are not optional packages and should carry sensible defaults that make sense. For kernel defaults the default needs to be set by the kernel, not by systemd. Other optional tools can overwrite such defaults by shipping their own config files which tweak the defaults. If postgres needs it, it should probably set the values itself and not make any expectations from the base OS. Systemd should never just unconditionally overwrite kernel defaults. That makes not much sense, and will be the wrong thing to do in the long run.
Reassigning to kernel. We will not override the kernel defaults by default in systemd. It is up to the kernel guys to figure out useful defaults that work for everybody, not for us. If the kernel guys don't agree with the requested change, they should close this bug, not us. (Though, given that RHEL supposedly defaults to the higher kernel values I don't see a reason why Fedora shouldn't. If these values work for RHEL and make people happy, then why not for Fedora?)
RHEL defaults to higher values by setting it via the sysctl in the initscripts package, not by carrying a patch to the kernel.
Closing this out. We're not carrying a patch to the kernel to adjust a sysctl to a higher value. That defeats the purpose of runtime tunable sysctls. If postgres has problems with the default value, it can install a sysctl file in /lib/sysctl.d/ to adjust it up. If someone really wants the kernel default changed, they should take it upstream and get it changed there.