summaryrefslogtreecommitdiff
path: root/src/backend/commands/user.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/user.c')
-rw-r--r--src/backend/commands/user.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c
index be049cb994..63f22d8adc 100644
--- a/src/backend/commands/user.c
+++ b/src/backend/commands/user.c
@@ -35,6 +35,9 @@
#include "utils/syscache.h"
#include "utils/tqual.h"
+/* Potentially set by contrib/pg_upgrade_support functions */
+Oid binary_upgrade_next_pg_authid_oid = InvalidOid;
+
/* GUC parameter */
extern bool Password_encryption;
@@ -394,6 +397,16 @@ CreateRole(CreateRoleStmt *stmt)
tuple = heap_form_tuple(pg_authid_dsc, new_record, new_record_nulls);
/*
+ * pg_largeobject_metadata contains pg_authid.oid's, so we
+ * use the binary-upgrade override, if specified.
+ */
+ if (OidIsValid(binary_upgrade_next_pg_authid_oid))
+ {
+ HeapTupleSetOid(tuple, binary_upgrade_next_pg_authid_oid);
+ binary_upgrade_next_pg_authid_oid = InvalidOid;
+ }
+
+ /*
* Insert new record in the pg_authid table
*/
roleid = simple_heap_insert(pg_authid_rel, tuple);