diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c index 9d79effa914..ed8f286e44a 100644 --- a/src/backend/postmaster/autovacuum.c +++ b/src/backend/postmaster/autovacuum.c @@ -1932,6 +1932,9 @@ get_database_list(void) CommitTransactionCommand(); + /* Be sure to restore caller's memory context */ + MemoryContextSwitchTo(resultcxt); + return dblist; }