8000
We read every piece of feedback, and take your input very seriously.
To see all av 8000 ailable qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 387a5cf commit e8d9caaCopy full SHA for e8d9caa
src/backend/utils/init/miscinit.c
@@ -48,6 +48,7 @@
48
#include "storage/procarray.h"
49
#include "utils/builtins.h"
50
#include "utils/guc.h"
51
+#include "utils/inval.h"
52
#include "utils/memutils.h"
53
#include "utils/pidfile.h"
54
#include "utils/syscache.h"
@@ -594,6 +595,13 @@ InitializeSessionUserId(const char *rolename, Oid roleid)
594
595
/* call only once */
596
AssertState(!OidIsValid(AuthenticatedUserId));
597
598
+ /*
599
+ * Make sure syscache entries are flushed for recent catalog changes.
600
+ * This allows us to find roles that were created on-the-fly during
601
+ * authentication.
602
+ */
603
+ AcceptInvalidationMessages();
604
+
605
if (rolename != NULL)
606
{
607
roleTup = SearchSysCache1(AUTHNAME, PointerGetDatum(rolename));
0 commit comments