summaryrefslogtreecommitdiff
path: root/src/backend/postmaster/autovacuum.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/postmaster/autovacuum.c')
-rw-r--r--src/backend/postmaster/autovacuum.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c
index 9c7d4b0c60..a1e670a3e8 100644
--- a/src/backend/postmaster/autovacuum.c
+++ b/src/backend/postmaster/autovacuum.c
@@ -1916,6 +1916,9 @@ get_database_list(void)
CommitTransactionCommand();
+ /* Be sure to restore caller's memory context */
+ MemoryContextSwitchTo(resultcxt);
+
return dblist;
}