pgsql: Separate messages for standby replies and hot standby feedback.
Separate messages for standby replies and hot standby feedback.
Allow messages to be sent at different times, and greatly reduce
the frequency of hot standby feedback. Refactor to allow additional
message types.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/06828c5febf3a8f9e94bce5bd84634ce990d299f
Modified Files
--------------
src/backend/replication/walreceiver.c | 104 ++++++++++++++++++++--------
src/backend/replication/walsender.c | 124 +++++++++++++++++++++------------
src/include/replication/walprotocol.h | 15 ++++-
3 files changed, 168 insertions(+), 75 deletions(-)
On Fri, Feb 18, 2011 at 6:34 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
Separate messages for standby replies and hot standby feedback.
Allow messages to be sent at different times, and greatly reduce
the frequency of hot standby feedback. Refactor to allow additional
message types.
You could refactor this some more to avoid calling
GetCurrentTimestamp() and TimestampDifferenceExceeds() twice each, but
I'm not sure whether it's worth it.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
On Fri, 2011-02-18 at 07:11 -0500, Robert Haas wrote:
On Fri, Feb 18, 2011 at 6:34 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
Separate messages for standby replies and hot standby feedback.
Allow messages to be sent at different times, and greatly reduce
the frequency of hot standby feedback. Refactor to allow additional
message types.You could refactor this some more to avoid calling
GetCurrentTimestamp() and TimestampDifferenceExceeds() twice each, but
I'm not sure whether it's worth it.
Thanks for the observation.
--
Simon Riggs http://www.2ndQuadrant.com/books/
PostgreSQL Development, 24x7 Support, Training and Services
On 18.02.2011 13:34, Simon Riggs wrote:
Separate messages for standby replies and hot standby feedback.
Allow messages to be sent at different times, and greatly reduce
the frequency of hot standby feedback. Refactor to allow additional
message types.
Please update the docs too, these messages are briefly explained at
http://developer.postgresql.org/pgdocs/postgres/protocol-replication.html
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
On Fri, 2011-02-18 at 20:22 +0200, Heikki Linnakangas wrote:
On 18.02.2011 13:34, Simon Riggs wrote:
Separate messages for standby replies and hot standby feedback.
Allow messages to be sent at different times, and greatly reduce
the frequency of hot standby feedback. Refactor to allow additional
message types.Please update the docs too, these messages are briefly explained at
http://developer.postgresql.org/pgdocs/postgres/protocol-replication.html
Hadn't forgotten, just working thru things in priority order.
--
Simon Riggs http://www.2ndQuadrant.com/books/
PostgreSQL Development, 24x7 Support, Training and Services
On Fri, Feb 18, 2011 at 2:07 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
On Fri, 2011-02-18 at 20:22 +0200, Heikki Linnakangas wrote:
On 18.02.2011 13:34, Simon Riggs wrote:
Separate messages for standby replies and hot standby feedback.
Allow messages to be sent at different times, and greatly reduce
the frequency of hot standby feedback. Refactor to allow additional
message types.Please update the docs too, these messages are briefly explained at
http://developer.postgresql.org/pgdocs/postgres/protocol-replication.htmlHadn't forgotten, just working thru things in priority order.
Updating the documentation is surely not a low-priority item.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company