agora inbox for pgsql-hackers@postgresql.org
help / color / mirror / Atom feedFrom: Mark Wong <markwkm@gmail.com>
To: Álvaro Herrera <alvherre@kurilemu.de>
Cc: Chao Li <li.evan.chao@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: updates for handling optional argument in system functions
Date: Wed, 11 Mar 2026 20:28:14 -0700
Message-ID: <abIyzgOLlB2rpPBP@o> (raw)
In-Reply-To: <202603031619.ih6a6v4k6hd6@alvherre.pgsql>
References: <aXv4FjR1RTr386D1@o>
<202603031619.ih6a6v4k6hd6@alvherre.pgsql>
On Tue, Mar 03, 2026 at 05:23:58PM +0100, Álvaro Herrera wrote:
> On 2026-Jan-29, Mark Wong wrote:
>
> > I don't have a solution for the case of a view storing the OID, but Álvaro
> > Herrera suggested to me to at least try preventing those OIDs from being
> > reused.
> >
> > I've attached a v3 patch set that introduces src/include/catalog/pg_retired.dat
> > to store previously used OIDs and procedure names that the scripts unused_oids
> > and renumber_oids.pl can consume to prevent the reuse of retired OIDs.
>
> Thinking about this again, I wonder where did we get the idea that
> reusing OIDs would be a problem. How exactly would this happen? When
> you pg_upgrade, your views are taken from a `pg_dump --binary-upgrade`
> of the original server, and then recreated using the text
> representation of the DDL. We don't pass the function OIDs in any way
> from the old server to the new server. And there's no other way (than
> pg_upgrade) to go from one major version to the next one where the OID
> has been reused.
>
> So why did we think this was an actual problem?
I'm not sure. I think I see the OID of a function get used in some places
likes rewriteDefine.c and parse_funcs.c, but I'm not sure if I see a function
OID get written out and re-read for a function name lookup in an upgrade code
path, yet...
Regards,
Mark
--
Mark Wong <markwkm@gmail.com>
EDB https://enterprisedb.com
view thread (31+ messages) latest in thread
Message-ID: <abIyzgOLlB2rpPBP@o>
Permalink: ../abIyzgOLlB2rpPBP@o/
Also on: postgresql.org/message-id/abIyzgOLlB2rpPBP@o
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: markwkm@gmail.com, alvherre@kurilemu.de, li.evan.chao@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: updates for handling optional argument in system functions
In-Reply-To: <abIyzgOLlB2rpPBP@o>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox