Re: Set new system identifier using pg_resetxlog - Mailing list pgsql-hackers

From Petr Jelinek
Subject Re: Set new system identifier using pg_resetxlog
Date
Msg-id 53C91095.9030606@2ndquadrant.com
Whole thread Raw
In response to Re: Set new system identifier using pg_resetxlog  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
On 18/07/14 13:18, Andres Freund wrote:
> On 2014-07-18 13:08:24 +0200, Petr Jelinek wrote:
>> On 18/07/14 00:41, Andres Freund wrote:
>>> Wouldn't it be better to use sscanf()? That should work with large
>>> inputs across platforms.
>>>
>>
>> Well, sscanf does not do much validation and silently truncates too big
>> input (which is why I replaced it with strtoull, original patch did have
>> sscanf)
>
> Well, the checks on length you've added should catch that when adapted
> properly.

I don't see a portable way how to validate too big input values when 
using sscanf.

>
> Maybe it's time to pursue
> http://archives.postgresql.org/message-id/20140603144654.GM24145%40awork2.anarazel.de
> further :(
>

Yes, I've seen that patch and was quite sad that it didn't make it in core.


--  Petr Jelinek                  http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: New functions in sslinfo module
Next
From: Fabien COELHO
Date:
Subject: Re: gaussian distribution pgbench