Skip to content

Commit 78bfba8

Browse files
authored
create global default privileges in the appropriate prepared databases (zalando#1421)
1 parent ffbcb70 commit 78bfba8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/cluster/sync.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,9 @@ func (c *Cluster) syncDatabases() error {
661661

662662
// set default privileges for prepared database
663663
for _, preparedDatabase := range preparedDatabases {
664+
if err := c.initDbConnWithName(preparedDatabase); err != nil {
665+
return fmt.Errorf("could not init database connection to %s", preparedDatabase)
666+
}
664667
if err = c.execAlterGlobalDefaultPrivileges(preparedDatabase+constants.OwnerRoleNameSuffix, preparedDatabase); err != nil {
665668
return err
666669
}

0 commit comments

Comments
 (0)