There's more…

The postgresql.conf file also supports an include directive. This allows the postgresql.conf file to reference other files, which can then reference other files, and so on. That may help you organize your parameter settings better, if you don't make it too complicated.

For more on reloading, see the Reloading the server configuration files recipe in Chapter 4, Server Control.

 If you are working with PostgreSQL version 9.4 or later, you can change the values stored in the parameter files directly from your session, with syntax such as the following:

ALTER SYSTEM SET shared_buffers = '1GB';

This command will not actually edit postgresql.conf. Instead, it writes the new setting to another file named postgresql.auto.conf. The effect is equivalent, albeit in a safer way. The original configuration is never written, so it cannot be damaged in the event of a crash. If you mess up with too many ALTER SYSTEM commands, you can always delete postgresql.auto.conf manually, and reload the configuration or restart PostgreSQL, depending on what parameters you changed.

PostgreSQL 10 now supports up to 7 TB of cache, if you have that much memory.