Skip site navigation (1) Skip section navigation (2)

Re: xlog location arithmetic

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Euler Taveira de Oliveira <euler(at)timbira(dot)com>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: xlog location arithmetic
Date: 2012-01-14 14:06:34
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Tue, Dec 6, 2011 at 1:19 PM, Euler Taveira de Oliveira
<euler(at)timbira(dot)com> wrote:
> Hi,
> A while ago when blogging about WAL [1], I noticed a function to deal with
> xlog location arithmetic is wanted. I remembered Depez [2] mentioning it and
> after some questions during trainings and conferences I decided to translate
> my shell script function in C.
> The attached patch implements the function pg_xlog_location_diff (bikeshed
> colors are welcome). It calculates the difference between two given
> transaction log locations. Now that we have pg_stat_replication view, it will
> be easy to get the lag just passing columns as parameters. Also, the
> monitoring tools could take advantage of it instead of relying on a fragile
> routine to get the lag.
> I noticed that pg_xlogfile_name* functions does not sanity check the xrecoff
> boundaries but that is material for another patch.
> [1]
> [2]

I think that this function is very useful. Can you add the patch into
CommitFest 2012-1 ?


Fujii Masao
NTT Open Source Software Center

In response to


pgsql-hackers by date

Next:From: Euler Taveira de OliveiraDate: 2012-01-14 14:12:21
Subject: Re: xlog location arithmetic
Previous:From: Thomas MunroDate: 2012-01-14 13:42:01
Subject: Re: Multithread Query Planner

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group