4

I have a need to increase wal_keep_segments on our master server. Can I do that on the fly or does it require a restart?

9

For checking the variable's context, you can execute the following query:

SELECT name, context FROM pg_settings WHERE name = '<variable name';

In the case of wal_keep_segments, the context is sighup which means that only requires a server reload. You can use pg_ctl reload from the shell prompt or select pg_reload_conf() from psql or database client.

In the latest version, there are 7 types of context. internal context means that only can be modified at compilation time, postmaster means that a service restart is needed, the others are more session/backend specific.

0
4

Based on the docs here and here modifying this parameter does not require a server restart. Otherwise it would be noted as This parameter can only be set at server start

pg_ctl reload will send a SIGHUP to the running processes and reload the setting. This should be run for any server that has the setting modified.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.