I have PostgreSQL 14 server running on Windows 10. I have read here that the default value for the shared_buffer parameter is low and increasing it can improve performance for some jobs. However, it appears that the shared_buffer parameter cannot be increased if the server (or database?) has already been created.
So, my question is: at what point in the setup process can I increase the value of this parameter on my machine?
CodePudding user response:
Changing shared_buffers
does not require setting up a new database cluster.
Specifically, the manual says:
This parameter can only be set at server start
In Windows terms, it means that any new values are applied at the time the Postgres Service starts.
You should be able to change the value in postgresql.conf
(which is usually located at C:\Program Files\PostgreSQL\<version_number>\data\postgresql.conf
) and then restart the Postgres service
Since you're using v. 14, you may also opt to use ALTER SYSTEM
instead of fiddling with postgresql.conf
:
ALTER SYSTEM SET shared_buffers TO <your_value>;
And then restart the service
CodePudding user response:
that is not what the manual of postgres says,
It only states, after increasing or decreasing the value , you need to restart the server, because it allocates the new memory size while starting.
see manual