diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c
index 1e646a1..6aa6868 100644
*** a/src/backend/utils/init/postinit.c
--- b/src/backend/utils/init/postinit.c
*************** InitPostgres(const char *in_dbname, Oid 
*** 853,858 ****
--- 853,866 ----
  	MyProc->databaseId = MyDatabaseId;
  
  	/*
+ 	 * We may have already established a catalog snapshot while trying to read
+ 	 * pg_authid; but until we have set up MyDatabaseId, we won't react to
+ 	 * incoming sinval messages properly, so we won't realize it if the
+ 	 * snapshot has been invalidated.  Best to 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
