From: Craig Ringer Date: Fri, 26 Jun 2015 13:11:00 +0000 (+0800) Subject: Don't check for presence of a PRIMARY KEY if not replicating rows X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=15abe5e5946c1542ecf43b42c69ba03c984d199f;p=2ndquadrant_bdr.git Don't check for presence of a PRIMARY KEY if not replicating rows --- diff --git a/bdr_executor.c b/bdr_executor.c index 10012fc1ba..5eaae4bb8f 100644 --- a/bdr_executor.c +++ b/bdr_executor.c @@ -949,6 +949,13 @@ BdrExecutorStart(QueryDesc *queryDesc, int eflags) continue; } + /* If replication is suppressed then no key is required */ + if (bdr_do_not_replicate) + { + RelationClose(rel); + continue; + } + if (read_only_node) ereport(ERROR, (errcode(ERRCODE_READ_ONLY_SQL_TRANSACTION),