Re: generating function default settings from pg_proc.dat

From: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
To: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: generating function default settings from pg_proc.dat
Date: 2026-02-17 08:49:33
Message-ID: CADkLM=cJkVqeP2iQW9ghdxYG51zPPTwZKYB2+_m=TFBnyOSMfw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 17, 2026 at 1:37 AM Álvaro Herrera <alvherre(at)kurilemu(dot)de> wrote:

> On 2026-Feb-16, Andres Freund wrote:
>
> > could be
> >
> > { oid => '3786', descr => 'set up a logical replication slot',
> > proname => 'pg_create_logical_replication_slot', provolatile => 'v',
> > proparallel => 'u',
> > proargs => [
> > {type => 'name', name => 'slot_name'},
> > {type => 'name', name => 'plugin'},
> > {type => 'bool', name => 'temporary', default => 'false'},
> > {type => 'bool', name => 'twophase', default => 'false'},
> > {type => 'bool', name => 'failover', default => 'false'},
> > ],
> > prorettype => [
> > {type => 'name', name => 'slot_name'},
> > {type => 'pg_lsn', name => 'lsn'},
> > ]
> > }
>
> This is pretty much the sort of thing I was imagining when I read
> Corey's argumentation. +1 for something along these lines.

I like this a lot too, but I'm noticing that with each iteration we're
getting closer to re-inventing SQL. Would it make sense in the long run to
have a mode on the CREATE FUNCTION command that cues initdb to create the
minimal function skeleton with prescribed oid on the first pass, but then
stores the defer-able parts (if any) for a later pass, perhaps in parallel?
Then we wouldn't have to worry about how to model all future additions to
CREATE FUNCTION, and instead focus on what parts of creating the function
need to be in the bootstrap pass.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2026-02-17 08:59:31 Re: Our ABI diff infrastructure ignores enum SysCacheIdentifier
Previous Message Kirill Reshke 2026-02-17 08:38:32 Re: Don't keep closed WAL segment in page cache after replay