Re: WIP: a way forward on bootstrap data

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: John Naylor <jcnaylor(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: a way forward on bootstrap data
Date: 2018-04-06 20:20:45
Message-ID: 916.1523046045@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Oh, one more thing: looking again at the contents of pg_proc.dat,
I find myself annoyed at the need to specify pronargs. That's
entirely derivable from proargtypes, and if we did so, we'd get
down to this for the first few pg_proc entries:

{ oid => '1242', descr => 'I/O',
proname => 'boolin', prorettype => 'bool', proargtypes => 'cstring',
prosrc => 'boolin' },
{ oid => '1243', descr => 'I/O',
proname => 'boolout', prorettype => 'cstring', proargtypes => 'bool',
prosrc => 'boolout' },
{ oid => '1244', descr => 'I/O',
proname => 'byteain', prorettype => 'bytea', proargtypes => 'cstring',
prosrc => 'byteain' },

which seems pretty close to the minimum amount of stuff you could expect
to need to write.

I recall that this and some other data compression methods were on the
table awhile back, and I expressed doubt about putting very much magic
knowledge in genbki.pl, but this case seems like a no-brainer. genbki
can always get the right answer, and expecting people to do it just
creates another way to make a mistake.

So attached is an incremental patch to do that. I had to adjust
AddDefaultValues's argument list to tell it the catalog name,
and once I did that, I saw that the API arrangement whereby the
caller throws error was just useless complexity, so I got rid of it.

regards, tom lane

Attachment Content-Type Size
remove-pronargs.patch text/x-diff 4.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Claudio Freire 2018-04-06 20:25:00 Re: Vacuum: allow usage of more than 1GB of work mem
Previous Message Andres Freund 2018-04-06 19:42:34 Re: Documentation for bootstrap data conversion