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-03-04 11:26:56
Message-ID:
CABUevEzVxwe5pynRwmxV=V_-Qbuavd-5GWqMf1gAezk1graR9g@mail.gmail.com (view raw or flat )
Thread:
2011-12-06 04:19:49 from Euler Taveira de Oliveira <euler(at)timbira(dot)com>
2011-12-06 10:14:02 from Magnus Hagander <magnus(at)hagander(dot)net>
2011-12-06 16:11:32 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-06 18:00:51 from Euler Taveira de Oliveira <euler(at)timbira(dot)com>
2011-12-06 18:06:36 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-13 17:48:22 from Jim Nasby <jim(at)nasby(dot)net>
2011-12-13 20:37:10 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-20 10:27:41 from Magnus Hagander <magnus(at)hagander(dot)net>
2011-12-20 13:08:50 from Euler Taveira de Oliveira <euler(at)timbira(dot)com>
2011-12-23 11:54:22 from Magnus Hagander <magnus(at)hagander(dot)net>
2011-12-23 15:05:54 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-12-23 15:13:41 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-23 15:18:21 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-12-23 15:32:29 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-23 15:59:35 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-12-23 16:15:07 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-23 15:13:42 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-01-21 16:13:41 from Euler Taveira de Oliveira <euler(at)timbira(dot)com>
2012-01-26 09:19:28 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-02-07 17:29:16 from Euler Taveira de Oliveira <euler(at)timbira(dot)com>
2012-02-08 12:35:15 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-02-09 22:00:30 from Euler Taveira de Oliveira <euler(at)timbira(dot)com>
2012-02-10 08:32:46 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-02-25 12:23:25 from Magnus Hagander <magnus(at)hagander(dot)net>
2012-02-25 23:53:19 from Euler Taveira de Oliveira <euler(at)timbira(dot)com>
2012-02-28 06:21:12 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-03-04 11:26:56 from Magnus Hagander <magnus(at)hagander(dot)net>
2012-03-04 11:26:36 from Magnus Hagander <magnus(at)hagander(dot)net>
2012-03-09 12:11:13 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-03-09 14:37:35 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2012-03-09 14:44:08 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-03-09 15:00:55 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2012-03-09 14:55:09 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2012-03-09 15:31:26 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-03-09 15:37:42 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2012-03-09 17:13:26 from Magnus Hagander <magnus(at)hagander(dot)net>
2012-03-09 19:23:28 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2012-03-09 19:26:44 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2012-03-09 19:34:04 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-03-09 19:39:26 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-03-09 20:04:23 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2012-03-09 20:12:20 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-03-13 00:47:24 from Bruce Momjian <bruce(at)momjian(dot)us>
2012-03-13 02:51:50 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-03-13 03:03:42 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2012-03-13 03:36:45 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-03-09 19:37:43 from "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
2012-03-09 17:14:00 from Magnus Hagander <magnus(at)hagander(dot)net>
2012-03-09 17:18:24 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2012-03-09 17:38:28 from Magnus Hagander <magnus(at)hagander(dot)net>
2012-03-09 18:23:38 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-03-13 02:34:10 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-04-13 20:30:16 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-04-14 11:25:42 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-04-14 12:08:12 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-01-17 14:46:07 from Peter Geoghegan <peter(at)2ndquadrant(dot)com>
2011-12-06 17:39:21 from Euler Taveira de Oliveira <euler(at)timbira(dot)com>
2012-01-14 14:06:34 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-01-14 14:12:21 from Euler Taveira de Oliveira <euler(at)timbira(dot)com>
2012-01-15 01:18:31 from Greg Smith <greg(at)2ndQuadrant(dot)com>
2012-01-15 03:49:00 from Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>
2012-01-15 04:44:08 from Greg Smith <greg(at)2ndQuadrant(dot)com>
2012-01-15 08:17:54 from Magnus Hagander <magnus(at)hagander(dot)net>
2012-01-15 08:37:30 from Greg Smith <greg(at)2ndQuadrant(dot)com>
2012-01-15 08:45:25 from Magnus Hagander <magnus(at)hagander(dot)net>
2012-01-16 17:57:25 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-01-16 17:58:29 from Magnus Hagander <magnus(at)hagander(dot)net>
2012-01-16 20:48:41 from Josh Berkus <josh(at)agliodbs(dot)com>
2012-01-16 21:10:23 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2012-01-16 21:25:50 from Josh Berkus <josh(at)agliodbs(dot)com>
2012-01-16 21:37:59 from Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
2012-01-16 22:08:09 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2012-01-16 22:25:50 from Greg Smith <greg(at)2ndQuadrant(dot)com>
2012-01-16 22:40:38 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2012-01-17 15:33:27 from Matteo Beccati <php(at)beccati(dot)com>
2012-01-17 16:50:41 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2012-01-17 17:10:11 from Matteo Beccati <php(at)beccati(dot)com>
2012-01-17 17:22:12 from Matteo Beccati <php(at)beccati(dot)com>
2012-01-17 16:50:20 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-01-17 17:24:05 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2012-01-17 20:17:05 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2012-01-18 01:23:13 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2012-01-18 02:46:36 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2012-01-22 18:53:39 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2012-01-16 23:23:33 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-01-17 16:50:26 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2012-01-17 18:19:13 from Greg Smith <greg(at)2ndQuadrant(dot)com>
2012-01-19 17:59:35 from Alex Shulgin <ash(at)commandprompt(dot)com>
2012-01-22 18:54:30 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2012-01-19 18:14:02 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-01-19 18:41:54 from Alex Shulgin <ash(at)commandprompt(dot)com>
2012-01-19 19:04:07 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2012-01-19 19:10:00 from Andrew Dunstan <andrew(at)dunslane(dot)net>
Lists:
pgsql-hackers
On Tue, Feb 28, 2012 at 07:21, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> On Sun, Feb 26, 2012 at 8:53 AM, 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.
>
> After this patch will have been committed, it would be better to change
> pg_xlogfile_name() and pg_xlogfile_name_offset() so that they use
> the validate_xlog_location() function to validate the input.
And I've done this part as well.
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
In response to
pgsql-hackers by date
Next :From: Brendan JurdDate: 2012-03-04 11:55:33
Subject : Re: Our regex vs. POSIX on "longest match"
Previous :From : Magnus HaganderDate : 2012-03-04 11:26:36
Subject : Re: xlog location arithmetic