Re: BDR: Can a node live alone after being detached

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: BDR: Can a node live alone after being detached
Дата
Msg-id CAMsr+YHiKvArOxLSGmEvuPU1je1gYaof3y7_30Ue1wF+WNJ67A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BDR: Can a node live alone after being detached  (Sylvain MARECHAL <marechal.sylvain2@gmail.com>)
Ответы Re: BDR: Can a node live alone after being detached  (Sylvain MARECHAL <marechal.sylvain2@gmail.com>)
Список pgsql-general
On 26 June 2015 at 04:59, Sylvain MARECHAL <marechal.sylvain2@gmail.com> wrote:
>
>> >> You shouldn't part a node from its self. The next revision will
>> >> prevent this with an error.
>> >
>> >
>> > Ok, this was not clear for me.
>>
>> Or anyone else, hence the coming docs and code changes.
>>
> Sorry to bother again about that, but what about the "detached node cleanup"
> best practice?
>
> Suppose I have 2 nodes, 'node1' and 'node2'. So I am OK to call
> bdr_part_by_node_names('node2') on node1 to detach node2. But then, is it
> safe to call bdr_part_by_node_names('node1') to do the cleanup on node2, or
> should I better call pg_drop_replication_slot('...') instead?

BDR 0.9.1 drops the slot on remaining nodes correctly on node part, so
no further action is required there. Just part_by_node_names the node
you are removing, running the query from one of the nodes you wish to
retain. (0.9.1 enforces this).

If you want to retain the node you're removing as a standalone, it
should be sufficient to drop any slots on that node, truncate
bdr.bdr_nodes and bdr.bdr_connections, and remove the bdr security
label with:

    SECURITY LABEL FOR bdr ON DATABASE thedb IS NULL;

then restart the DB. You may also wish to remove 'bdr' from
'shared_preload_libraries'.

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


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

Предыдущее
От: 娄帅
Дата:
Сообщение: Question about the isolation level and visible
Следующее
От: Xiang Gan
Дата:
Сообщение: Re: Question about the isolation level and visible