sharadov
sharadov

Reputation: 1098

Issue modifying effective_cache_size in postgresql.conf

I am trying to enable and set a value for the effective_cache_size, and issuing a SIGHUP, but the value does not change. Running postgres 9.5.5. Based on the documentation it does not require a restart, merely a reload. Here is the value I inserted into postgresql.conf

effective_cache_size = 12GB

I am not calling other configuration files from within the postgresql.conf. When I query pg_settings the source file shows /data1/pgdata/mydb/postgresql.auto.conf rather than /data1/pgdata/mydb/postgresql.conf

This gets a little more bizzare, I used

ALTER system set effective_cache_size = 12 GB 

and ran

select pg_reload_conf;

when I run

show effective_cache_size;

it says 12 GB

Any ideas?

Upvotes: 0

Views: 2642

Answers (1)

virgo47
virgo47

Reputation: 2333

pg_settings shows it in blocks, typically 8KB - perhaps that's the problem.

I got the same problem - which actually led me here. I set 6GB and pg_settings showed 786432 and the source was configuration file - confusing. When I changed it to 4GB and restarted, it said 524288 - aha, so it is changing!

Documentation for the variable says: "If this value is specified without units, it is taken as blocks, that is BLCKSZ bytes, typically 8kB."

Upvotes: 0

Related Questions