| From: | Andreas Karlsson <andreas(at)proxel(dot)se> |
|---|---|
| To: | Mark Wong <markwkm(at)gmail(dot)com>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
| Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: updates for handling optional argument in system functions |
| Date: | 2026-02-18 21:56:56 |
| Message-ID: | 8f291697-8389-4913-9a4c-5c5cee717fca@proxel.se |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 1/30/26 1:15 AM, Mark Wong wrote:
>> Thanks for the patch. After reviewing it, I have mixed feelings. From one side, it removes some redundant code, which is good. In the other side, I doubt if we should delete proc entries from pg_proc.c? Say, there is a view that uses a proc to be deleted, the proc OID is stored with the view, then after an upgrade, the view would be broken. From this perspective, should we retain the old proc entries and only point them to the new functions?
>
> 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.
>
> Maybe that can also be used towards finding that particular solution...
I am not sure what can be done, breaking people's databases on
pg_upgrade is certainly not nice and detecting that function oid has
been used anywhere in a database sounds painful, especially since there
are no references to system oids in pg_depend, right?
That said this patch should be updated to use the new support for
default values in BKI files.[1]
https://git.postgresql.org/cgit/postgresql.git/commit/?id=759b03b24ce96f0ba6d734b570d1a6f4a0fb1177
Andreas
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Zsolt Parragi | 2026-02-18 22:11:54 | Re: Headerscheck support for meson |
| Previous Message | Peter Smith | 2026-02-18 21:56:29 | Re: [PATCH] Support automatic sequence replication |