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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to