Skip to content

Commit c6c0521

Browse files
committed
Check unit's host for restart need
1 parent 3a535de commit c6c0521

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/charm.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3146,7 +3146,9 @@ def is_restart_pending(self) -> bool:
31463146
connection = None
31473147
try:
31483148
with (
3149-
self.postgresql._connect_to_database() as connection,
3149+
self.postgresql._connect_to_database(
3150+
database_host=self.postgresql.current_host
3151+
) as connection,
31503152
connection.cursor() as cursor,
31513153
):
31523154
cursor.execute("SELECT COUNT(*) FROM pg_settings WHERE pending_restart=True;")

0 commit comments

Comments
 (0)