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

Re: xlog location arithmetic

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Euler Taveira de Oliveira <euler(at)timbira(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: xlog location arithmetic
Date: 2012-03-09 17:13:26
Message-ID: CABUevExZ6TgAQCy9+JOWUFRs0bYeunh9HW2SOKxk_LvdMZ2ULA@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Fri, Mar 9, 2012 at 16:37, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Fri, Mar 9, 2012 at 9:55 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> Actually ... now that I look at it, isn't it completely bogus to be
>>> using numeric for the result of pg_xlog_location_diff?
>
>> rhaas=# select pg_xlog_location_diff('ffffffff/0', '0/0')::int8;
>> ERROR:  bigint out of range
>
> Oh ... I see my mistake.  I was looking at this:
>
>        /*
>         * result = XLogFileSize * (xlogid1 - xlogid2) + xrecoff1 - xrecoff2
>         */
>
> and confusing XLogFileSize with XLogSegSize.  Not the best choice of
> names.

Yeah, the use of XLogFile to mean something other than, well a file in
the xlog, is greatly annoying.. I guess we could change it, but it
goes pretty deep in the system so it's not a small change...

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

Responses

pgsql-hackers by date

Next:From: Magnus HaganderDate: 2012-03-09 17:14:00
Subject: Re: xlog location arithmetic
Previous:From: David E. WheelerDate: 2012-03-09 17:02:01
Subject: Re: elegant and effective way for running jobs inside a database

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