From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
Cc: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Set new system identifier using pg_resetxlog |
Date: | 2014-06-30 16:46:11 |
Message-ID: | 20140630164611.GT7340@eldon.alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andres Freund wrote:
> c) We already allow to set pretty much all aspects of the control file
> via resetxlog - there seems little point of not having the ability to
> change the system identifier.
I think it's pretty much a given that pg_resetxlog is a tool that can
have disastrous effects if used lightly. If people changes their sysid
wrongly, they're not any worse than if they change their multixact
counters and start getting failures because the old values stored in
data cannot be resolved anymore ("it's already been wrapped around").
Or if they remove all the XLOG they have since the latest crash. From
that POV, I don't think the objection that "but this can be used to
corrupt data!" has any value.
Also on the other hand pg_resetxlog is already a tool for PG hackers to
fool around and test things. In a way, being able to change values in
pg_control is useful to many of us; this is only an extension of that.
If we only had bricks and mortar, I think we would have a tool to
display and tweak pg_control separately from emptying pg_xlog, rather
than this odd separation between pg_controldata and pg_resetxlog, each
of which do a mixture of those things. But we have a wall two thirds
done already, so it seems to make more sense to me to continue forward
rather than tear it down and start afresh. This patch is a natural
extension of what we already have.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2014-06-30 16:46:29 | Re: Spinlocks and compiler/memory barriers |
Previous Message | geohas | 2014-06-30 16:37:32 | Does changing attribute order breaks something? |