Skip to content

Commit eae7fe4

Browse files
committed
Remove direct call to GetNewObjectId() for pg_auth_members.oid
This routine should not be called directly as mentioned at its top, so replace it by GetNewOidWithIndex(). Issue introduced by 6566133 when pg_auth_members.oid got added, so no backpatch is needed. Author: Maciek Sakrejda Discussion: https://postgr.es/m/CAOtHd0Ckbih7Ur7XeVyLAJ26VZOfTNcq9qV403bNF4uTGtAN+Q@mail.gmail.com
1 parent b8c0ffb commit eae7fe4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/commands/user.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1850,7 +1850,8 @@ AddRoleMems(const char *rolename, Oid roleid,
18501850
}
18511851

18521852
/* get an OID for the new row and insert it */
1853-
objectId = GetNewObjectId();
1853+
objectId = GetNewOidWithIndex(pg_authmem_rel, AuthMemOidIndexId,
1854+
Anum_pg_auth_members_oid);
18541855
new_record[Anum_pg_auth_members_oid - 1] = objectId;
18551856
tuple = heap_form_tuple(pg_authmem_dsc,
18561857
new_record, new_record_nulls);

0 commit comments

Comments
 (0)