Search Postgresql Archives

Re: Correct query to check streaming replication lag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 






On Tue, Jan 21, 2014 at 1:30 PM, Sameer Kumar <sameer.kumar@xxxxxxxxxx> wrote:

On Tue, Jan 21, 2014 at 12:12 PM, Michael Paquier <michael.paquier@xxxxxxxxx> wrote:
Mind you, here is a simple suggestion:
SELECT application_name, pg_xlog_location_diff(sent_location, flush_location) AS replay_delta, sync_priority, sync_state FROM pg_stat_replication ORDER BY replay_delta ASC, application_name;

This is much more simple, but I guess would work only with v9.2 and higher (?).
Yep, pg_xlog_location_diff is in core since 9.2.
--
Michael

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux