Thread: Setting up BDR 0.9.0 - error on bdr_group_create
I'm trying to test BDR 0.9.0 with Postgres 9.4.1-2, both from the 2nd Quadrant repo. I'm following the latest docs here: http://bdr-project.org/docs/next/index.html I started with fresh installations of Postgres and the BDR plugin and have done something similar to what is shown in theQuick Start guide, the difference being that I'm actually using two separate machines. When I get to the point of addingthe first node, using bdr.bdr_group_create, I get an error - ERROR: schema "bdr" does not exist. Here is more infoon the error: postgres=# SELECT bdr.bdr_group_create( postgres(# local_node_name := 'cxtlabdev014', postgres(# node_external_dsn := 'port=5432 dbname=prod' postgres(# ); ERROR: getting remote node id failed DETAIL: SELECT sysid, timeline, dboid FROM bdr.bdr_get_local_nodeid() failed with: ERROR: schema "bdr" does not exist CONTEXT: SQL statement "SELECT * FROM bdr_get_remote_nodeinfo(node_local_dsn)" PL/pgSQL function internal_begin_join(text,text,text,text) line 41 at SQL statement SQL statement "SELECT bdr.internal_begin_join( 'bdr_group_join', local_node_name, CASE WHEN node_local_dsn IS NULL THEN node_external_dsn ELSE node_local_dsn END, join_using_dsn)" PL/pgSQL function bdr_group_join(text,text,text,text,integer,text[]) line 21 at PERFORM SQL statement "SELECT bdr.bdr_group_join( local_node_name := local_node_name, node_external_dsn := node_external_dsn, join_using_dsn := null, node_local_dsn := node_local_dsn, apply_delay := apply_delay, replication_sets := replication_sets)" PL/pgSQL function bdr_group_create(text,text,text,integer,text[]) line 3 at PERFORM I can see that the schema exists: postgres=# \dn List of schemas Name | Owner --------+---------- bdr | postgres public | postgres Any pointers on what I am missing are appreciated. Thanks, Steve Boyle
On 26 March 2015 at 06:02, Steve Boyle <sboyle@connexity.com> wrote:
postgres=# SELECT bdr.bdr_group_create(
postgres(# local_node_name := 'cxtlabdev014',
postgres(# node_external_dsn := 'port=5432 dbname=prod'
postgres(# );
ERROR: getting remote node id failed
DETAIL: SELECT sysid, timeline, dboid FROM bdr.bdr_get_local_nodeid() failed with: ERROR: schema "bdr" does not exist
It looks like you're running bdr_group_create from the 'postgres' database, but you're specifying the dbname 'prod' as the database that you're creating the bdr group for.
You should CREATE EXTENSION bdr; in the 'prod' database and run bdr.bdr_group_create while connected to 'prod'.
The documentation should be more explicit about the fact that the management commands affect the database they are run in.
Thanks for writing a clear and detailed report with errors, versions, and command shown. It's much appreciated.