Memory units in the postgresql.conf
All of the shared memory settings and the starting client settings for the database are stored in the postgresql.conf
file. In PostgreSQL 8.2, a change has greatly simplified memory settings. In earlier versions, you had to know the unit for each memory related setting; some were in units of 1 KB, and some 8 KB, which was difficult to keep track of.
Nowadays, you can still set values like that, but the preferred practice is to use a memory size, instead. For example, if you wanted to set the wal_buffers
value that controls how much memory to use for buffering write-ahead log data, you can do that now with a line like the following in the postgresql.conf
:
wal_buffers
= 64 KB
If you use the SHOW
command to display the value for this setting, it will write it similarly (although, it's possible that the value will get re-scaled to display better). However, the database still converts this value into its own internal units, which for this parameter...