ISOLATIONCHECKS=\
isolation/sleep5 \
- isolation/waitforstart
+ isolation/waitforstart \
+ isolation/ddlconflict
bdr_isolation_regress_check: all | submake-isolation submake-btree_gist
[ -e pg_hba.conf ] || ln -s $(top_srcdir)/contrib/bdr/pg_hba.conf .
--- /dev/null
+Parsed test spec with 2 sessions
+
+starting permutation: s1b s1ct s2b s2ct s1c s2c s2dt s1wait s2wait s2ct2
+step s1b: BEGIN;
+step s1ct: CREATE TABLE bdr_ddl_conflict_a(f1 int);
+step s2b: BEGIN;
+step s2ct: CREATE TABLE bdr_ddl_conflict_b(f1 int);
+ERROR: database is locked against ddl by another node
+step s1c: COMMIT;
+step s2c: COMMIT;
+step s2dt: DROP TABLE bdr_ddl_conflict_a;
+step s1wait: SELECT pg_xlog_wait_remote_apply(pg_current_xlog_location(), pid) FROM pg_stat_replication;
+pg_xlog_wait_remote_apply
+
+
+
+
+
+
+
+step s2wait: SELECT pg_xlog_wait_remote_apply(pg_current_xlog_location(), pid) FROM pg_stat_replication; select * from pg_sleep(1);
+pg_xlog_wait_remote_apply
+
+
+
+
+
+
+
+pg_sleep
+
+
+step s2ct2: CREATE TABLE bdr_ddl_conflict_c(f1 int);
--- /dev/null
+conninfo "node1" "dbname=node1"
+conninfo "node2" "dbname=node2"
+
+teardown
+{
+ DROP TABLE IF EXISTS bdr_ddl_conflict_a, bdr_ddl_conflict_b, bdr_ddl_conflict_c;
+}
+
+session "snode1"
+step "s1b" { BEGIN; }
+step "s1ct" { CREATE TABLE bdr_ddl_conflict_a(f1 int); }
+step "s1c" { COMMIT; }
+step "s1wait" { SELECT pg_xlog_wait_remote_apply(pg_current_xlog_location(), pid) FROM pg_stat_replication; }
+
+session "snode2"
+step "s2b" { BEGIN; }
+step "s2ct" { CREATE TABLE bdr_ddl_conflict_b(f1 int); }
+step "s2c" { COMMIT; }
+step "s2dt" { DROP TABLE bdr_ddl_conflict_a; }
+step "s2wait" { SELECT pg_xlog_wait_remote_apply(pg_current_xlog_location(), pid) FROM pg_stat_replication; select * from pg_sleep(1); }
+step "s2ct2" { CREATE TABLE bdr_ddl_conflict_c(f1 int); }
+
+permutation "s1b" "s1ct" "s2b" "s2ct" "s1c" "s2c" "s2dt" "s1wait" "s2wait" "s2ct2"