Skip to content

Commit 8281c2c

Browse files
author
a.b.christie
committed
fix: Fix recovery typo
1 parent ddf176c commit 8281c2c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sql-recovery/recovery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ def error(error_no):
548548
# Filter - Remove actions on the root (postgres) user, which will otherwise
549549
# cause the recovery to fail with "current user cannot be dropped".
550550
# We only need to do this if the recovery is from a dumpall.
551-
if DATABASE:
551+
if not DATABASE:
552552
TARGET_FILE = "%s/%s.sql" % (RECOVERY_ROOT_DIR, DECOMPRESSED_RECOVERY_NAME)
553553
FILTER_PG_CMD = "egrep -v '^(CREATE|DROP) ROLE %s;' %s > filtered.sql ; mv filtered.sql %s" % (RECOVERY_DATABASE_ROOT_USER, TARGET_FILE, TARGET_FILE)
554554
print(" $", FILTER_PG_CMD)

0 commit comments

Comments
 (0)