diff options
Diffstat (limited to 'src/backend/commands/dbcommands.c')
-rw-r--r-- | src/backend/commands/dbcommands.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c index b76972f18d..2ecc3cf3a2 100644 --- a/src/backend/commands/dbcommands.c +++ b/src/backend/commands/dbcommands.c @@ -39,6 +39,7 @@ #include "utils/acl.h" #include "utils/array.h" #include "utils/builtins.h" +#include "utils/flatfiles.h" #include "utils/fmgroids.h" #include "utils/guc.h" #include "utils/lsyscache.h" @@ -506,6 +507,11 @@ createdb(const CreatedbStmt *stmt) /* Close pg_database, but keep exclusive lock till commit */ heap_close(pg_database_rel, NoLock); + + /* + * Set flag to update flat database file at commit. + */ + database_file_update_needed(); } @@ -642,6 +648,11 @@ dropdb(const char *dbname) /* Close pg_database, but keep exclusive lock till commit */ heap_close(pgdbrel, NoLock); + + /* + * Set flag to update flat database file at commit. + */ + database_file_update_needed(); } @@ -741,6 +752,11 @@ RenameDatabase(const char *oldname, const char *newname) /* Close pg_database, but keep exclusive lock till commit */ heap_close(rel, NoLock); + + /* + * Set flag to update flat database file at commit. + */ + database_file_update_needed(); } @@ -834,6 +850,11 @@ AlterDatabaseSet(AlterDatabaseSetStmt *stmt) /* Close pg_database, but keep exclusive lock till commit */ heap_close(rel, NoLock); + + /* + * We don't bother updating the flat file since ALTER DATABASE SET + * doesn't affect it. + */ } @@ -933,6 +954,11 @@ AlterDatabaseOwner(const char *dbname, AclId newOwnerSysId) /* Close pg_database, but keep exclusive lock till commit */ heap_close(rel, NoLock); + + /* + * We don't bother updating the flat file since ALTER DATABASE OWNER + * doesn't affect it. + */ } |