Re: Loading Data Dumps for Tables Containing BDR Global Sequence

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: John Casey <john(dot)casey(at)innovisors(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Loading Data Dumps for Tables Containing BDR Global Sequence
Date: 2015-01-07 13:34:44
Message-ID: 54AD35F4.40702@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 01/04/2015 12:14 AM, John Casey wrote:
> We have been trying to load our existing database that contains local
> sequences into a BDR-based database with global sequences.

[snip]

> There just doesn’t seem to be a good way to accomplish this operation,
> at least not a documented way I have been able to find.

I think you want default_seqam = bdr .

https://wiki.postgresql.org/wiki/BDR_Global_Sequences#Global_sequences_created_by_default

You can pass this to psql or pg_restore using a PGOPTIONS setting or an
'options=' entry in a connection dsn, e.g.

pg_restore -d "dbname=mydb options='-c default_sequenceam=bdr'" dumpfile

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2015-01-07 13:36:30 Re: NODE
Previous Message Craig Ringer 2015-01-07 13:25:01 Re: ALTER TABLE to ADD BDR global sequence