File tree Expand file tree Collapse file tree 3 files changed +13
-17
lines changed
lib/charms/postgresql_k8s/v0 Expand file tree Collapse file tree 3 files changed +13
-17
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 35
35
36
36
# Increment this PATCH version before using `charmcraft publish-lib` or reset
37
37
# to 0 if you are raising the major API version
38
- LIBPATCH = 54
38
+ LIBPATCH = 55
39
39
40
40
# Groups to distinguish HBA access
41
41
ACCESS_GROUP_IDENTITY = "identity_access"
@@ -267,7 +267,8 @@ def create_database(
267
267
raise PostgreSQLCreateDatabaseError () from e
268
268
269
269
# Enable preset extensions
270
- self .enable_disable_extensions (dict .fromkeys (plugins , True ), database )
270
+ if plugins :
271
+ self .enable_disable_extensions (dict .fromkeys (plugins , True ), database )
271
272
272
273
def create_user (
273
274
self ,
Original file line number Diff line number Diff line change @@ -2326,9 +2326,16 @@ def relations_user_databases_map(self) -> dict:
2326
2326
})
2327
2327
return user_database_map
2328
2328
try :
2329
- for user in sorted (
2330
- self .postgresql .list_users_from_relation (current_host = self .is_connectivity_enabled )
2331
- ):
2329
+ for user in self .postgresql .list_users (current_host = self .is_connectivity_enabled ):
2330
+ if user in (
2331
+ "backup" ,
2332
+ "monitoring" ,
2333
+ "operator" ,
2334
+ "postgres" ,
2335
+ "replication" ,
2336
+ "rewind" ,
2337
+ ):
2338
+ continue
2332
2339
user_database_map [user ] = "," .join (
2333
2340
self .postgresql .list_accessible_databases_for_user (
2334
2341
user , current_host = self .is_connectivity_enabled
You can’t perform that action at this time.
0 commit comments