Обсуждение: BDR: changing dsn on a running node

Поиск
Список
Период
Сортировка

BDR: changing dsn on a running node

От
"Natan Abolafya"
Дата:

Hi

 

Is it possible to change the dsn connection string of a node without leaving the group? I couldn’t find the related documentation unfortunately.

We’re using BDR in a dynamic environment where the hostname/ip of a node may be changed any time. Leaving and rejoining the BDR group seems to be a solution but is a bit tedious and a slow process.

 

Natan

 

 

 

Re: BDR: changing dsn on a running node

От
Sylvain MARECHAL
Дата:
Le 07/10/2016 à 23:54, Natan Abolafya a écrit :

Hi

 

Is it possible to change the dsn connection string of a node without leaving the group? I couldn’t find the related documentation unfortunately.

We’re using BDR in a dynamic environment where the hostname/ip of a node may be changed any time. Leaving and rejoining the BDR group seems to be a solution but is a bit tedious and a slow process.

 

Natan

 

 

 

Hi, Just to say I did it with bdr 0.9.3 to change the password of the connection string.
I needed to manually modify the bdr.bdr_nodes and bdr.bdr_connections tables for all nodes but finally it works.
What I found strange is that the changes were not replicated automatically.
(Note there is a bdr.bdr_connections_changed() stored procedure, I am not sure this is needed, I did not use it)

My 2 cents,
Sylvain

Re: BDR: changing dsn on a running node

От
Craig Ringer
Дата:
On 12 October 2016 at 00:55, Sylvain MARECHAL
<marechal.sylvain2@gmail.com> wrote:
> Le 07/10/2016 à 23:54, Natan Abolafya a écrit :
>
> Is it possible to change the dsn connection string of a node without leaving
> the group? I couldn’t find the related documentation unfortunately.
>
> We’re using BDR in a dynamic environment where the hostname/ip of a node may
> be changed any time. Leaving and rejoining the BDR group seems to be a
> solution but is a bit tedious and a slow process.

You can update the bdr.bdr_connections entry and then kill the apply workers.

Right now bdr.bdr_connections_changed() doesn't know to check for a
changed DSN. I'd welcome a patch to address that, since I probably
won't have time to get to it soon.

We should have a bdr.bdr_connection_set_dsn(...) function, really.
Again, a patch would be welcomed.

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