Re: bdr_init_copy fails when starting 2nd BDR node - Mailing list pgsql-general

From John Casey
Subject Re: bdr_init_copy fails when starting 2nd BDR node
Date
Msg-id 005201d0249f$34290d50$9c7b27f0$@icloud.com
Whole thread Raw
In response to Re: bdr_init_copy fails when starting 2nd BDR node  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: bdr_init_copy fails when starting 2nd BDR node  ('Andres Freund' <andres@2ndquadrant.com>)
List pgsql-general
> What was your bdr config at this point? The error message indicates that
it tries to
> connect to port 5432 on localhost - but the copy was taken from
'main_node_ip'.
> Perhaps you forgot to specify the ehost in the config?

# Here is my conf on the DR server (where I am running bdr_init_copy)
bdr.connections = 'primary'
bdr.primary_dsn = 'dbname=my_db host=primary_ip user=my_username  port=5432'
bdr.primary_init_replica = on
bdr.primary_replica_local_dsn = 'dbname=my_db user=my_username port=5432'

# For reference, here is the conf on my Primary server:
bdr.connections = 'dr'
bdr.dr_dsn = 'dbname=my_db host=dr_ip user=my_username  port=5432'

> What does 'git describe --tags' return?

bdr-pg/REL9_4beta3-1-120-ga2725dd

-----Original Message-----
From: Andres Freund [mailto:andres@2ndquadrant.com]
Sent: Tuesday, December 30, 2014 12:57 PM
To: John Casey
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] bdr_init_copy fails when starting 2nd BDR node

Hi,

On 2014-12-29 23:51:05 -0500, John Casey wrote:
> I've been having issues while attempting to begin BDR replication. If
> I set up the main node, then use bdr_init_copy, it always fails on
> second node, as shown below.
>
>
>
> postgres$ rm -Rf $PGDATA
>
> postgres$ echo db_password | pg_basebackup -X stream -h main_node_ip
> -p 5432 -U username -D $PGDATA
>
> postgres$ cp $HOME/backup/postgresql.conf $PGDATA
>
> postgres$ bdr_init_copy -U username -D $PGDATA
>
> bdr_init_copy: starting...
>
> Assigning new system identifier: 6098464173726284030...
>
> Creating primary replication slots...
>
> Creating restore point...
>
> Could not connect to the remote server: could not connect to server:
> No such file or directory
>
>         Is the server running locally and accepting
>
>         connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

What was your bdr config at this point? The error message indicates that it
tries to connect to port 5432 on localhost - but the copy was taken from
'main_node_ip'. Perhaps you forgot to specify th ehost in the config?

What does 'git describe --tags' return?

Greetings,

Andres Freund



pgsql-general by date:

Previous
From: Maxim Boguk
Date:
Subject: Re: Improving performance of merging data between tables
Next
From: 'Andres Freund'
Date:
Subject: Re: bdr_init_copy fails when starting 2nd BDR node