Re: Set new system identifier using pg_resetxlog

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Set new system identifier using pg_resetxlog
Дата
Msg-id 20140618174758.GT3115@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: Set new system identifier using pg_resetxlog  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-hackers
On 2014-06-18 10:44:56 -0700, Josh Berkus wrote:
> On 06/13/2014 05:31 PM, Petr Jelinek wrote:
> > Hello,
> > 
> > attached is a simple patch which makes it possible to change the system
> > identifier of the cluster in pg_control. This is useful for
> > individualization of the instance that is started on top of data
> > directory produced by pg_basebackup - something that's helpful for
> > logical replication setup where you need to easily identify each node
> > (it's used by Bidirectional Replication for example).
> 
> I'm unclear on why we would overload pg_resetxlog for this.  Wouldn't it
> be better design to have an independant function,
> "pg_set_system_identifier"?

You mean an independent binary? Because it's not possible to change this
at runtime.

If so, it's because pg_resetxlog already has the option to change many
related things (e.g. the timeline id). And it'd require another copy of
several hundred lines of code. It's all stored in the control file/checkpoints.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Set new system identifier using pg_resetxlog
Следующее
От: Abhijit Menon-Sen
Дата:
Сообщение: Re: Set new system identifier using pg_resetxlog