From: | Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com> |
---|---|
To: | 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 17:57:45 |
Message-ID: | CAD21AoBqjKQ7+EX2Q51PL2GZyqvkaFxAgw-N3HG0jQco4ZS+Kg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thank you for updating the patch.
I think that the following behaviour of pg_resetxlog is bug.
$ pg_controldata data | grep "Database system identifier"
Database system identifier: 6029284919152642525
--
$ pg_resetxlog -s0 -n data
Current pg_control values:
pg_control version number: 942
Catalog version number: 201406181
Database system identifier: 6029284919152642525
Latest checkpoint's TimeLineID: 1
Latest checkpoint's full_page_writes: on
Latest checkpoint's NextXID: 0/1810
Latest checkpoint's NextOID: 13004
Latest checkpoint's NextMultiXactId: 1
Latest checkpoint's NextMultiOffset: 0
Latest checkpoint's oldestXID: 1800
Latest checkpoint's oldestXID's DB: 1
Latest checkpoint's oldestActiveXID: 0
Latest checkpoint's oldestMultiXid: 1
Latest checkpoint's oldestMulti's DB: 1
Maximum data alignment: 8
Database block size: 8192
Blocks per segment of large relation: 131072
WAL block size: 8192
Bytes per WAL segment: 16777216
Maximum length of identifiers: 64
Maximum columns in an index: 32
Maximum size of a TOAST chunk: 1996
Size of a large-object chunk: 2048
Date/time type storage: 64-bit integers
Float4 argument passing: by value
Float8 argument passing: by value
Data page checksum version: 0
Values to be changed:
First log segment after reset: 000000010000000000000002
--
$ pg_resetxlog -s0 data
Transaction log reset
$ pg_controldata data | grep "Database system identifier"
Database system identifier: 6029284919152642525
this patch dose not works fine with -s0.
Regards,
--
Sawada Masahiko
On Thursday, June 26, 2014, Petr Jelinek <petr(at)2ndquadrant(dot)com> wrote:
> 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
>> -s60289079176954718651111111111111111111111111111111111111111
>> 11111111111111
>> 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
>
--
Regards,
-------
Sawada Masahiko
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-06-26 18:14:18 | Re: Allowing NOT IN to use ANTI joins |
Previous Message | Tom Lane | 2014-06-26 17:55:24 | Re: Changes in amcanreturn() interface to support multicolumn indexes |