From: | Petr Jelinek <petr(at)2ndquadrant(dot)com> |
---|---|
To: | Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Set new system identifier using pg_resetxlog |
Date: | 2014-06-26 11:27:26 |
Message-ID: | 53AC039E.50401@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 25/06/14 19:43, Sawada Masahiko wrote:
> Hi,
>
> I send you review comment about thie patch.
Hello, thanks.
> --
> $ pg_resetxlog -s -n data | grep "Database system identifier"
> Database system identifier: 6028907917695471865
>
> The -s option does not worksfine with -n option.
Fixed.
> --
> $ pg_resetxlog
> -s6028907917695471865111111111111111111111111111111111111111111111111111111
> data
> Transaction log reset
> $ pg_controldata data | grep "Database system identifier"
> Database system identifier: 18446744073709551615
>
> pg_resetxlog is finished successfully, but system identifier was not
> changed.
> Also I think that checking data about number of digits is needed.
>
It actually did change the identifier, just to ULONG_MAX, since that's
the maximum value that can be set (scanf does that conversion), I added
check that limits the maximum value of system identifier input to
ULONG_MAX-1 and reports error if it's bigger. I also added some
additional input validation.
--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
Attachment | Content-Type | Size |
---|---|---|
pg_resetxlog-sysid-v2.patch | text/x-diff | 5.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Glaesemann | 2014-06-26 12:04:48 | Re: sorting a union over inheritance vs pathkeys |
Previous Message | Andres Freund | 2014-06-26 11:21:48 | Re: better atomics - v0.5 |