On Mon, Dec 19, 2011 at 1:17 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Fri, Dec 16, 2011 at 10:01 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
>> To provide some form of keepalive on quiet systems the
>> archive_keepalive_command provides a generic hook to implement
>> keepalives. This is implemented as a separate command to avoid storing
>> keepalive messages in the archive, or at least allow overwrites using
>> a single filename like "keepalive".
>
> This may be stupid of me, but I don't see the point of this. If you
> want keepalives, why use log shipping rather than SR?
On Dec 12, you said "It also strikes me that anything
that is based on augmenting the walsender/walreceiver protocol leaves
anyone who is using WAL shipping out in the cold. I'm not clear from
the comments you or Simon have made how important you think that use
case still is."
Not wanting to leave anyone out in the cold, I proposed something to
enhance file based replication also.
In any case, multiple others have requested this feature, so its worth
doing even if you have changed your mind.
> Implementing a
> really-high-latency method of passing protocol messages through the
> archive seems like a complex solution to a non-problem (but, like I
> say, I may be missing something).
So a) it is a problem, and b) its not complex.
The proposed method doesn't necessarily use the archive. Allowing
users to specify how the keepalive will work makes it a flexible
solution to a widely recognised problem.
This proposal doesn't replace the protocol keepalive for streaming
replication, it provides exactly the same thing for file based
replication users. Many people use both streaming and file-based, so
need a way to measure latency that acts similarly no matter which one
is currently in use.
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services