From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Magnus Hagander <magnus(at)hagander(dot)net> |
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-03-09 12:11:13 |
Message-ID: | CAHGQGwHtxJiHGof7gm+qcbYBtwLn6mnYj83w6SX8xctvDA-1tw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Mar 4, 2012 at 8:26 PM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> On Sun, Feb 26, 2012 at 00:53, Euler Taveira de Oliveira
> <euler(at)timbira(dot)com> wrote:
>> On 25-02-2012 09:23, Magnus Hagander wrote:
>>> 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?
>>>
>> sscanf() is too fragile for input sanity check. Try
>> pg_xlog_location_diff('12/3', '-10/0'), for example. I won't object removing
>> that function if you protect xlog location input from silly users.
>
> Ah, good point. No, that's the reason I was missing :-)
>
> Patch applied, thanks!
Thanks for committing the patch!
Euler proposed one more patch upthread, which replaces pg_size_pretty(bigint)
with pg_size_pretty(numeric) so that pg_size_pretty(pg_xlog_location_diff())
succeeds. It's also worth committing this patch?
http://archives.postgresql.org/message-id/4F315F6C.8030700@timbira.com
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2012-03-09 12:20:33 | Re: pg_stats_recovery view |
Previous Message | Thom Brown | 2012-03-09 11:53:38 | Re: Command Triggers, patch v11 |