Re: BDR question on dboid conflicts

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: "Zhu, Joshua" <jzhu(at)vormetric(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: BDR question on dboid conflicts
Date: 2017-10-27 02:24:21
Message-ID: CAMsr+YETtA1ANjauud4jE2p3jqmYKNNCOGVCzMEHYSMKpd3vPQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 27 October 2017 at 01:15, Zhu, Joshua <jzhu(at)vormetric(dot)com> wrote:
> Database oid is used in both bdr.bdr_nodes, as node_dboid, and
> bdr.bdr_connections, as conn_dboid, also used in construction of replication
> slot names.

Correct. However, it's used in conjunction with the sysid and node timeline ID.

> I noticed that when trying to join a bdr group, if the database oid on the
> new node happens to be the same as that of an node already in the bdr group,
> the join would fail, and the only way to resolve the conflict that I was
> able to come up with has been to retry with dropping/recreating the database
> until the dboid does not conflict with any node already in the group.

That is extremely surprising. In our regression tests the database
oids should be the same quite often, as we do various tests where we
create multiple instances. More importantly, every time you
bdr_init_copy, you get a clone with the same database oid, and that
works fine.

There's no detail here to work from, so I cannot guess what's actually
happening, but I can confidently say it's not a database oid conflict.
Nowhere in BDR should the database oid be considered without the rest
of the (sysid,timeline,dboid) tuple.

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris Albertson 2017-10-27 06:40:59 Can't build ODBC -- odbc_config not found
Previous Message Rob Sargent 2017-10-27 01:07:25 Re: query not scaling