Thread: pgsql: Automatically terminate replication connections that are idle fo
pgsql: Automatically terminate replication connections that are idle fo
From
Heikki Linnakangas
Date:
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 Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/754baa21f723255272c24dc5f9ab456858e361e3 Modified Files -------------- doc/src/sgml/config.sgml | 28 +++ src/backend/libpq/pqcomm.c | 240 ++++++++++++++++++------- src/backend/port/unix_latch.c | 26 ++- src/backend/port/win32/socket.c | 13 ++- src/backend/port/win32_latch.c | 30 +++- src/backend/replication/walsender.c | 143 ++++++++++----- src/backend/utils/misc/guc.c | 10 + src/backend/utils/misc/postgresql.conf.sample | 1 + src/include/libpq/libpq.h | 3 + src/include/replication/walsender.h | 1 + src/include/storage/latch.h | 2 +- 11 files changed, 368 insertions(+), 129 deletions(-)