Re: Set new system identifier using pg_resetxlog

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-25 17:43:07
Message-ID: CAD21AoCdcHvu8X3i5yY40ZEJOjsW=5X-hKKQA5GzF9+Hi-u+1Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

regards
--
Sawada Masahiko

On Thursday, June 19, 2014, Petr Jelinek <petr(at)2ndquadrant(dot)com> wrote:

> On 18/06/14 19:26, Robert Haas wrote:
>
>> On Wed, Jun 18, 2014 at 12:54 PM, Andres Freund <andres(at)2ndquadrant(dot)com>
>> wrote:
>>
>>> I don't see how the proposed ability makes it more dangerous. It
>>> *already* has the ability to reset the timelineid. That's the case where
>>> users are much more likely to think about resetting it because that's
>>> much more plausible than taking a unrelated cluster and resetting its
>>> sysid, timeline and LSN.
>>>
>>
>> All right, well, I've said my piece. I don't have anything to add to
>> that that isn't sheer repetition. My vote is to hold off on this
>> until we've talked about replication identifiers and other related
>> topics in more depth. But if that position doesn't garner majority
>> support ... so be it!
>>
>>
> I am not sure I get what does this have to do with replication
> identifiers. The patch has several use-cases, one of them has to do that
> you can know the future system id before you set it, which is useful for
> automating some things...
>
> --
> Petr Jelinek http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training & Services
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

--
Regards,

-------
Sawada Masahiko

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-06-25 17:45:31 Re: better atomics - v0.5
Previous Message Josh Berkus 2014-06-25 17:39:53 Re: better atomics - v0.5