Re: Set new system identifier using pg_resetxlog

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Set new system identifier using pg_resetxlog
Дата
Msg-id 20140630164611.GT7340@eldon.alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Set new system identifier using pg_resetxlog  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: Set new system identifier using pg_resetxlog
Список 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: better atomics - v0.5
Следующее
От: Tom Lane
Дата:
Сообщение: Re: better atomics - v0.5