From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Improve replication connection timeouts. |
Date: | 2012-10-11 14:52:17 |
Message-ID: | E1TMK7V-0003sC-0u@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Improve replication connection timeouts.
Rename replication_timeout to wal_sender_timeout, and add a new setting
called wal_receiver_timeout that does the same at the walreceiver side.
There was previously no timeout in walreceiver, so if the network went down,
for example, the walreceiver could take a long time to notice that the
connection was lost. Now with the two settings, both sides of a replication
connection will detect a broken connection similarly.
It is no longer necessary to manually set wal_receiver_status_interval to
a value smaller than the timeout. Both wal sender and receiver now
automatically send a "ping" message if more than 1/2 of the configured
timeout has elapsed, and it hasn't received any messages from the other end.
Amit Kapila, heavily edited by me.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/6f60fdd7015b032bf49273c99f80913d57eac284
Modified Files
--------------
doc/src/sgml/config.sgml | 36 ++++++----
doc/src/sgml/release-9.1.sgml | 2 +-
src/backend/replication/walreceiver.c | 94 +++++++++++++++++++++----
src/backend/replication/walsender.c | 88 +++++++++++++++---------
src/backend/utils/misc/guc.c | 15 ++++-
src/backend/utils/misc/postgresql.conf.sample | 5 +-
src/include/replication/walprotocol.h | 12 +++
src/include/replication/walreceiver.h | 2 +
src/include/replication/walsender.h | 2 +-
src/include/replication/walsender_private.h | 1 -
10 files changed, 190 insertions(+), 67 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-10-11 16:22:35 | pgsql: Fix cross-type case in partial row matching for hashed subplans. |
Previous Message | Peter Eisentraut | 2012-10-11 11:07:03 | pgsql: Refactor flex and bison make rules |