HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlModerate

Does changing `wal_keep_segments` require a restart?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
restartwal_keep_segmentsrequiredoeschanging

Problem

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?

Solution

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.

Code Snippets

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

Context

StackExchange Database Administrators Q#146543, answer score: 12

Revisions (0)

No revisions yet.