Changes

Jump to navigation Jump to search
no edit summary
/etc/init.d/postgresql stop
 
Test the right location:
/usr/lib/postgresql/9.5/bin/postgres -D /var/postgresql/data > logile 2>&1 &
 
As postgres, edit /etc/postgresql/9.5/main/postgresql.conf (see http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server)
 
data_directory='/var/postgresql/data'
listen_addresses = '*'
port = 5432
max_connections = 10
###HERE###
checkpoint_segments=32
This is equivalent to every 512Mb
shared_buffers = 786432
The recommendation is to use around 25-40% of RAM (we have 256Gb) for high-performance systems like ours. We might need to check that we are running 64bit and that our kernel supports this.
work_mem = 2097152
#In KB, so 1024 * 512=> 524288 = 512Mb,
Note that this might be a little too high for aggresively stacked queries
But this seems to be the bite point for performance.
maintenance_work_mem = 262144
#786432 => 6 * 1073741824 => 6 * 131072 * 8 * 1024
This is how much VACUUM will use - it doesn't make a huge difference
effective_cache_size = 1835008
#In 8k blocks. This is the maximum memory that postgres will allocate.
It is currently set to 14Gb.
To work as the postgres account.
(Answer y or n to whether you want the new role to be superuser, etc.)
If the user doesn't have an account on the box, then you'll need to add a database for them (use DBname of 'firstname_data' as a default): createdb -O username DBname
Drop the dbase and the user with:
Anonymous user

Navigation menu