fix(rds): terminate target sessions during PostgreSQL restore (#6550)

This commit is contained in:
jwoa95 authored and GitHub committed 2026-10-25 17:29:09 -04:00
1 parent a79cc4d8c4
commit 5f63ffb761
3 files changed
+12 -2

No files matched your search

@@ -1439,6 +1439,8 @@ class RdsContainerManagerTest {
void restoreScriptDropsNonSystemDatabasesAndRoles() {
String script = RdsContainerManager.postgresRestoreScript();
assertTrue(script.contains("WITH (FORCE)"),
"Restore must terminate sessions such as pg_cron connected to the target database");
assertTrue(script.contains("datistemplate = false"),
"Script must only drop non-template databases");
assertTrue(script.contains("datname <> 'postgres'"),