Re: Set new system identifier using pg_resetxlog

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Set new system identifier using pg_resetxlog
Date: 2014-08-25 19:45:50
Message-ID: 18408.1408995950@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <hlinnakangas(at)vmware(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2014-08-25 19:48:40 Re: psql \watch versus \timing
Previous Message Bruce Momjian 2014-08-25 19:36:31 Re: pg_dumpall reccomendation in release notes