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

From Tom Lane
Subject Re: Set new system identifier using pg_resetxlog
Date
Msg-id 18408.1408995950@sss.pgh.pa.us
Whole thread Raw
In response to Re: Set new system identifier using pg_resetxlog  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: Set new system identifier using pg_resetxlog
Re: Set new system identifier using pg_resetxlog
List pgsql-hackers
Heikki Linnakangas <hlinnakangas@vmware.com> writes:
> In summary, I think we want this feature in some form, but we'll somehow 
> need to be make the distinction to the dangerous pg_resetxlog usage. It 
> might be best, after all, to make this a separate utility, 
> pg_resetsystemid.

That sounds fairly reasonable given your point about not wanting people to
confuse this with the can-eat-your-data aspects of pg_resetxlog.  (OTOH,
won't this result in a lot of code duplication?  We'd still need to erase
and refill the WAL area.)

> It would not need to have the capability to set the 
> system ID to a particular value, only a randomly assigned one (setting 
> it to a particular value could be added to pg_resetxlog, where other 
> dangerous options are).

I'm less convinced about that.  While you can shoot yourself in the foot
by assigning the same system ID to two installations that share WAL
archive or something like that, this feels a bit different than the ways
you can shoot yourself in the foot with pg_resetxlog.  If we do what you
say here then I think we'll be right back to the discussion of how to
separate the assign-a-sysID option from pg_resetxlog's other, more
dangerous options.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: psql \watch versus \timing
Next
From: Andres Freund
Date:
Subject: Re: Set new system identifier using pg_resetxlog