Skip to content

Commit 61a8072

Browse files
balinorLiangtjmoore4
authored andcommitted
Fix missing error handling in WriteUsersInPostgreSQL
1 parent 8de67b8 commit 61a8072

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/postgres/users.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ SELECT pg_catalog.format('GRANT ALL PRIVILEGES ON DATABASE %I TO %I',
169169
// The operator will attempt to write schemas for the users in the spec if
170170
// * the feature gate is enabled and
171171
// * the cluster is annotated.
172-
if feature.Enabled(ctx, feature.AutoCreateUserSchema) {
172+
if feature.Enabled(ctx, feature.AutoCreateUserSchema) && err == nil {
173173
autoCreateUserSchemaAnnotationValue, annotationExists := cluster.Annotations[naming.AutoCreateUserSchemaAnnotation]
174174
if annotationExists && strings.EqualFold(autoCreateUserSchemaAnnotationValue, "true") {
175175
log.V(1).Info("Writing schemas for users.")

0 commit comments

Comments
 (0)