Re: xlog location arithmetic - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: xlog location arithmetic
Date
Msg-id CABUevEwb8hS1Z7mnZjqbo8WBCe-XiSJ9UYXcWWrDo30qbFCm-g@mail.gmail.com
Whole thread Raw
In response to Re: xlog location arithmetic  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: xlog location arithmetic
List pgsql-hackers
On Fri, Feb 10, 2012 at 09:32, Fujii Masao <masao.fujii@gmail.com> wrote:
> On Fri, Feb 10, 2012 at 7:00 AM, Euler Taveira de Oliveira
> <euler@timbira.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

pgsql-hackers by date:

Previous
From: Thom Brown
Date:
Subject: Re: Command Triggers, patch v11
Next
From: Thom Brown
Date:
Subject: Re: Command Triggers, patch v11