Aman
Aman

Reputation: 353

Postgresql - changing conf file parameters

I am trying to change some parameteres in postgresql.conf file. I changed the parameters to following values

  1. Shared_buffers: 8000MB
  2. work_mem: 3200MB
  3. maintenance_work_mem: 1600MB

I have postgresql installed on 128GB RAM server. After making these changes I restarted postgresql server. After that when I use psql to check these parameters using show (parameter_name) I get the following values.

  1. Shared_buffers: 8000MB
  2. work_mem: 4MB
  3. maintenance_work_mem: 2047MB

Why did the changes reflect correctly only in the shared_buffer parameter but not in the other two?

I changed the max_wal_size to 4GB and min_wal_size to 1000MB but these parameters did not change too and the values shown are 1GB and 80MB. So in conclustion, of all the changes that I made only the changes to shared_buffers parameter got reflected while others did not change.

Upvotes: 0

Views: 3071

Answers (1)

Laurenz Albe
Laurenz Albe

Reputation: 246493

Some possibilities what might be the problem:

  • You edited the wrong postgresql.conf.

  • You restarted the wrong server.

  • The value was configured with ALTER SYSTEM.

  • The value was configured with ALTER USER or ALTER DATABASE.
    Use the psql command \drds to see such settings.

To figure out from where PostgreSQL takes the setting, use

SELECT * FROM pg_settings WHERE name = 'work_mem';

Upvotes: 2

Related Questions