pgsql: Separate messages for standby replies and hot standby feedback.

Started by Simon Riggsalmost 15 years ago6 messages
#1Simon Riggs
simon@2ndQuadrant.com

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(-)

#2Robert Haas
robertmhaas@gmail.com
In reply to: Simon Riggs (#1)
Re: [COMMITTERS] pgsql: Separate messages for standby replies and hot standby feedback.

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

#3Simon Riggs
simon@2ndQuadrant.com
In reply to: Robert Haas (#2)
Re: [COMMITTERS] pgsql: Separate messages for standby replies and hot standby feedback.

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

#4Heikki Linnakangas
heikki.linnakangas@enterprisedb.com
In reply to: Simon Riggs (#1)
Re: pgsql: Separate messages for standby replies and hot standby feedback.

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

#5Simon Riggs
simon@2ndQuadrant.com
In reply to: Heikki Linnakangas (#4)
Re: pgsql: Separate messages for standby replies and hot standby feedback.

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

#6Robert Haas
robertmhaas@gmail.com
In reply to: Simon Riggs (#5)
Re: pgsql: Separate messages for standby replies and hot standby feedback.

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.html

Hadn'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