On 1 March 2017 at 10:47, Thomas Munro <thomas.mu...@enterprisedb.com> wrote:
> On Fri, Feb 24, 2017 at 9:05 AM, Simon Riggs <si...@2ndquadrant.com> wrote:
>> On 21 February 2017 at 21:38, Thomas Munro
>> <thomas.mu...@enterprisedb.com> wrote:
>>> However, I think a call like LagTrackerWrite(SendRqstPtr,
>>> GetCurrentTimestamp()) needs to go into XLogSendLogical, to mirror
>>> what happens in XLogSendPhysical.  I'm not sure about that.
>> Me neither, but I think we need this for both physical and logical.
>> Same use cases graphs for both, I think. There might be issues with
>> the way LSNs work for logical.
> This seems to be problematic.  Logical peers report LSN changes for
> all three operations (write, flush, commit) only on commit.  I suppose
> that might work OK for synchronous replication, but it makes it a bit
> difficult to get lag measurements that don't look really strange and
> sawtoothy when you have long transactions, and overlapping
> transactions might interfere with the measurements in odd ways.  I
> wonder if the way LSNs are reported by logical rep would need to be
> changed first.  I need to study this some more and would be grateful
> for ideas from any of the logical rep people.

I have no doubt there are problems with the nature of logical
replication that affect this. Those things are not the problem of this
patch but that doesn't push everything away.

What we want from this patch is something that works for both, as much
as that is possible.

With that in mind, this patch should be able to provide sensible lag
measurements from a simple case like logical replication of a standard
pgbench run. If that highlights problems with this patch then we can
fix them here.


Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to