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

From Michael Paquier
Subject Re: Set new system identifier using pg_resetxlog
Date
Msg-id CAB7nPqQJS+10T8RdxmLU5C-NafZ0KxQQBYyrnxwuY7ECRwggRQ@mail.gmail.com
Whole thread
In response to Re: Set new system identifier using pg_resetxlog  (Sawada Masahiko <sawada.mshk@gmail.com>)
List pgsql-hackers



On Thu, Jun 26, 2014 at 2:43 AM, Sawada Masahiko <sawada.mshk@gmail.com> wrote:
Hi,

I send you review comment about thie patch.

I found no error/warning with compling and installation.
I have executed pg_resetxlog with some input pattern.

$ initdb -D data -E UTF8 --no-locale
$ pg_controldata data | grep "Database system identifier"
Database system identifier:           6028907917695471865

--
$ pg_resetxlog -s -n  data | grep "Database system identifier"
Database system identifier:           6028907917695471865

The -s option does not works fine with -n option.

--
$ 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.

Yep, system_identifier is a uint64, and the input you are giving here is incompatible with that.
--
Michael

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: better atomics - v0.5
Next
From: tim_wilson
Date:
Subject: Re: Inaccuracy in VACUUM's tuple count estimates