BDR: Can a node live alone after being detached

From: Sylvain MARECHAL <marechal(dot)sylvain2(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: BDR: Can a node live alone after being detached
Date: 2015-06-15 09:19:40
Message-ID: 557E98AC.3020707@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello all,

Is it possible to completely detach a node so that it can live alone, in
particular that DDL are again possible on that node?

I tried with a simple node without success:
<<<
postgres=# create database test template template0;
CREATE DATABASE
postgres=# \c test
You are now connected to database "test" as user "dbadmin".
test=# CREATE EXTENSION btree_gist;
CREATE EXTENSION
test=# CREATE EXTENSION bdr;
CREATE EXTENSION

-- DDL are still possible
test=# create table before_node_creation (i int primary key not null);
CREATE TABLE

-- Now create the group. After that, DDL are now forbidden
test=# SELECT bdr.bdr_group_create(local_node_name :=
'node1',node_external_dsn := 'host=172.27.118.64 port=5432 dbname=test');

test=# create table after_node_creation (i int primary key not null);
ERROR: No peer nodes or peer node count unknown, cannot acquire DDL lock
HINT: BDR is probably still starting up, wait a while

-- Now detach the group, in the hope to create some table
-- But this does not work. DDL are still forbidden
test=# select bdr.bdr_part_by_node_names('{node1}');

test=# create table after_node_creation (i int primary key not null);
ERROR: No peer nodes or peer node count unknown, cannot acquire DDL lock
HINT: BDR is probably still starting up, wait a while
test=#
>>>

Thanks and Regards,
Sylvain
NB: This post was part of a bigger - may be too dense - post: "BDR: Node
join and leave questions"

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2015-06-15 13:47:18 Re: [HACKERS] 9.4.1 -> 9.4.2 problem: could not access status of transaction 1
Previous Message Michael Paquier 2015-06-15 01:24:43 Re: pg_last_xact_replay_timestamp lies