Re: GetNewObjectId question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Maciek Sakrejda <m(dot)sakrejda(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: GetNewObjectId question
Date: 2022-12-11 00:11:13
Message-ID: 1546622.1670717473@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Maciek Sakrejda <m(dot)sakrejda(at)gmail(dot)com> writes:
> While browsing through varsup.c, I noticed this comment on GetNewObjectId:
> * Hence, this routine should generally not be used directly. The only direct
> * callers should be GetNewOidWithIndex() and GetNewRelFileNumber() in
> * catalog/catalog.c.

> But AddRoleMems in user.c appears to also call the function directly:

> /* get an OID for the new row and insert it */
> objectId = GetNewObjectId();

Yeah, that looks like somebody didn't read the memo.
Want to submit a patch?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ian Lawrence Barwick 2022-12-11 00:14:42 Re: [RFC] Add jit deform_counter
Previous Message Ian Lawrence Barwick 2022-12-11 00:01:05 Re: pg_rewind race condition just after promotion