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

Re: xlog location arithmetic

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Euler Taveira de Oliveira <euler(at)timbira(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: xlog location arithmetic
Date: 2012-02-25 12:23:25
Message-ID: CABUevEwb8hS1Z7mnZjqbo8WBCe-XiSJ9UYXcWWrDo30qbFCm-g@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Fri, Feb 10, 2012 at 09:32, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> On Fri, Feb 10, 2012 at 7:00 AM, Euler Taveira de Oliveira
> <euler(at)timbira(dot)com> wrote:
>> On 08-02-2012 09:35, Fujii Masao wrote:
>>
>> Fujii, new patch attached. Thanks for your tests.
>
> Thanks for the new patch!
>
>>> But another problem happened. When I changed pg_proc.h so that the unused
>>> OID was assigned to pg_xlog_location_diff(), and executed the above again,
>>> I encountered the segmentation fault:
>>>
>> I reproduced the problems in my old 32-bit laptop. I fixed it casting to
>> int64. I also updated the duplicated OID.
>
> Yep, in the updated patch, I could confirm that the function works fine without
> any error in my machine. The patch looks fine to me except the following minor
> comments:

I started working on this one to commit it, and came up with a few things more.

Do we even *need* the validate_xlog_location() function? If we just
remove those calls, won't we still catch all the incorrectly formatted
ones in the errors of the sscanf() calls? Or am I too deep into
weekend-mode and missing something obvious?

I've also removed tabs in the documentation, fixed the merge confllict
in pg_proc.h that happened during the wait, and fixed some indentation
(updated patch with these changes attached).

But I'm going to hold off committing it until someone confirms I'm not
caught too deeply in weekend-mode and am missing something obvious in
the comment above about validate_xlog_location.

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

Attachment: xlogdiff4.diff
Description: text/x-patch (6.5 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Thom BrownDate: 2012-02-25 12:42:00
Subject: Re: Command Triggers, patch v11
Previous:From: Thom BrownDate: 2012-02-25 12:07:36
Subject: Re: Command Triggers, patch v11

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