From: Craig Ringer Date: Mon, 21 Apr 2014 05:51:31 +0000 (+0800) Subject: bdr: If bdr.max_connections is zero, don't try to allocate -1 shmem X-Git-Url: http://git.postgresql.org/gitweb/delmail?a=commitdiff_plain;h=c0bbb3e4d08eeb47c5d4f099ddb294da0ccc325a;p=users%2Fandresfreund%2Fpostgres.git bdr: If bdr.max_connections is zero, don't try to allocate -1 shmem --- diff --git a/contrib/bdr/bdr.c b/contrib/bdr/bdr.c index 74df6b690b..3f5dba4c4c 100644 --- a/contrib/bdr/bdr.c +++ b/contrib/bdr/bdr.c @@ -1309,7 +1309,12 @@ _PG_init(void) /* if nothing is configured, we're done */ if (connections == NULL) + { + /* If worker count autoconfigured, use zero */ + if (bdr_max_workers == -1) + bdr_max_workers = 0; goto out; + } /* Copy 'connections' guc so SplitIdentifierString can modify it in-place */ connections_tmp = pstrdup(connections);