diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2011-03-30 10:10:32 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2011-03-30 10:20:37 +0300 |
commit | 754baa21f723255272c24dc5f9ab456858e361e3 (patch) | |
tree | fb2b3c4abb71fd3d0786f3b67c931820b386cf7f /src/backend/utils/misc/guc.c | |
parent | bc03c5937d103952ef4f40a3fa4514c154538d25 (diff) | |
download | postgresql-754baa21f723255272c24dc5f9ab456858e361e3.tar.gz postgresql-754baa21f723255272c24dc5f9ab456858e361e3.zip |
Automatically terminate replication connections that are idle for more
than replication_timeout (a new GUC) milliseconds. The TCP timeout is often
too long, you want the master to notice a dead connection much sooner.
People complained about that in 9.0 too, but with synchronous replication
it's even more important to notice dead connections promptly.
Fujii Masao and Heikki Linnakangas
Diffstat (limited to 'src/backend/utils/misc/guc.c')
-rw-r--r-- | src/backend/utils/misc/guc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 9ca1329e1e3..b49bdaea9d0 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -1856,6 +1856,16 @@ static struct config_int ConfigureNamesInt[] = }, { + {"replication_timeout", PGC_SIGHUP, WAL_REPLICATION, + gettext_noop("Sets the maximum time to wait for WAL replication."), + NULL, + GUC_UNIT_MS + }, + &replication_timeout, + 60 * 1000, 0, INT_MAX, NULL, NULL + }, + + { {"commit_delay", PGC_USERSET, WAL_SETTINGS, gettext_noop("Sets the delay in microseconds between transaction commit and " "flushing WAL to disk."), |