Today I learnt that ALTER SYSTEM SET max_connections = 100; writes a new configuration file in the data directory for PostgreSQL, postgresql.auto.conf which takes priority over the values in the normal postgresql.config file.
It's especially pointless to use ALTER SYSTEM for max_connections because you