Re: Tracking replication slot "blockings" - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Tracking replication slot "blockings"
Date
Msg-id 20140416165648.GP17874@awork2.anarazel.de
Whole thread Raw
In response to Tracking replication slot "blockings"  (Magnus Hagander <magnus@hagander.net>)
Responses Re: Tracking replication slot "blockings"  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
Hi,

On 2014-04-16 18:51:41 +0200, Magnus Hagander wrote:
> I'm thinking it could be interesting to know how many times (or in some
> other useful unit than "times" - how often) a specific replication slot has
> "blocked" xlog rotation. Since this AFAIK only happens during checkpoints,
> it seems it should be "reasonably cheap" to track? It would serve as an
> indicator of which slave(s) are having enough trouble keeping up to
> potentially cause issues.

The xlog removal code just check the "global minimum" required LSN - it
doesn't check the individual slots. So you'd need to add a bit more code
to that location. But it'd be easy.

But I think I'd just monitor/graph the byte difference for all slots
using pg_replication_slots...

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Marco Atzeri
Date:
Subject: Re: test failure on latest source
Next
From: Magnus Hagander
Date:
Subject: Re: Tracking replication slot "blockings"