aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/init/postinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/init/postinit.c')
-rw-r--r--src/backend/utils/init/postinit.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c
index 28243ad58f9..6e269cdfbab 100644
--- a/src/backend/utils/init/postinit.c
+++ b/src/backend/utils/init/postinit.c
@@ -824,6 +824,14 @@ InitPostgres(const char *in_dbname, Oid dboid, const char *username,
MyProc->databaseId = MyDatabaseId;
/*
+ * We established a catalog snapshot while reading pg_authid and/or
+ * pg_database; but until we have set up MyDatabaseId, we won't react to
+ * incoming sinval messages for unshared catalogs, so we won't realize it
+ * if the snapshot has been invalidated. Assume it's no good anymore.
+ */
+ InvalidateCatalogSnapshot();
+
+ /*
* Now, take a writer's lock on the database we are trying to connect to.
* If there is a concurrently running DROP DATABASE on that database, this
* will block us until it finishes (and has committed its update of