From 12458f2d3202ad02463141201c830e26e32fb94d Mon Sep 17 00:00:00 2001 From: Rafia Sabih Date: Thu, 20 Jun 2019 12:19:00 +0200 Subject: [PATCH] Do not sync roles for standby Standby cluster is streaming from the master and does not require to create or use databases of it's own. Hence, bypass the creation of users or databases. Though the standby cluster would work without this also, but will have errors in logs, this is to avoid that. --- pkg/cluster/sync.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/cluster/sync.go b/pkg/cluster/sync.go index f5ae30b81..420b4995f 100644 --- a/pkg/cluster/sync.go +++ b/pkg/cluster/sync.go @@ -428,6 +428,10 @@ func (c *Cluster) syncSecrets() error { func (c *Cluster) syncRoles() (err error) { c.setProcessName("syncing roles") + if c.Spec.StandbyCluster != nil { + c.logger.Info("no need to sync roles for standby cluster") + return nil + } var ( dbUsers spec.PgUserMap userNames []string