how to create a new column in postgresql UDR database

533 views Asked by At

I need to be able to create a new column in an existing table in a database that has been set up to use postgresql UDR. From what I've read, you cannot run DDL commands in BDR unless you write the syntax in a specific way... For example, I found this post on stackoverflow:

Django 1.8 Migration with Postgres BDR 9.4.1

I've tried to follow something similar with my UDR setup... but it's not working for me.

Specifically, I've tried the following:

mydatabase=# alter table mytable add column newcolumn character varying(50) not null default 'boo';
ERROR:  ALTER TABLE ... ADD COLUMN ... DEFAULT may only affect UNLOGGED or TEMPORARY tables when BDR is active; mytable is a regular table

and this:

mydatabase=# alter table mytable add column newcolumn character varying(50);
ERROR:  No peer nodes or peer node count unknown, cannot acquire DDL lock
HINT:  BDR is probably still starting up, wait a while
mydatabase=# 

Are you allowed to run DDL commands in a UDR setup? If anyone has some tips, I'd appreciate it. thanks.

0

There are 0 answers