From: | Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr> |
---|---|
To: | Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com> |
Cc: | Jaime Casanova <jaime(at)2ndquadrant(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: in-catalog Extension Scripts and Control parameters (templates?) |
Date: | 2013-06-27 09:49:47 |
Message-ID: | m2txkjyjb8.fsf@2ndQuadrant.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
Thanks a lot for your review!
Some answers here, new version of the patch with fixes by tuesday.
Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com> writes:
> - If I have control file that has the same name as template, create
> extension picks up control file? Is this by design?
Yes. That should allow to answer most of Heikki's security complaint,
but isn't enough to allow us to open the feature to non superuser if I
understand correctly.
> - Though control file is kind of global information among different
> databases, pg_extension_template is not. Sounds a little weird to me.
I think that's a limitation of the old model and we don't want to turn
templates for extensions into being shared catalogs. At least that's my
understanding of the design consensus.
> - Why do we need with() clause even if I don't need it?
Will have a fresh look, thanks.
> - I copied and paste from my plv8.control file to template script, and
> MODULE_PATHNAME didn't work. By design?
Yes. MODULE_PATHNAME is deprecated by the control file parameter of the
same name, and there's no reason to use it in extension templates even
if we got to support C coded extensions in them, which is not the case
now.
> foo=# create template for extension ex2 version '1.0' with (requires ex1)
> as $$ $$;
> ERROR: template option "requires" takes an argument
Will see about that.
> - create template ex2, create extension ex2, alter template ex2 rename to
> ex3, create extension ex3, drop template ex3;
> foo=# drop template for extension ex3 version '1.0';
> ERROR: cannot drop unrecognized object 3179 16429 0 because other objects
> depend on it
Well, if I'm following, you're trying to remove a non-existing object. I
guess you would prefer a better error message, right?
> - a template that is created in another template script does not appear to
> depend on the parent template.
I don't think that should be automatically the case, even if I admit I
didn't think about that case.
> - Without control file/template, attempt to create a new extension gives:
> foo=# create extension plv8;
> ERROR: extension "plv8" has no default control template
> but can it be better, like "extension plv8 has no default control file or
> template"?
Will rework.
> - Do we really need separate tables, pg_extension_template and
> pg_extension_control?
Yes, to be able to have the same feature as we have today with
auxilliary control files, that is change properties of the extension
from a version to the next.
> - Looks like both tables don't have toast tables. Some experiment gives:
> ERROR: row is too big: size 8472, maximum size 8160
Will fix in next version of the patch.
Thanks,
--
Dimitri Fontaine 06 63 07 10 78
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
From | Date | Subject | |
---|---|---|---|
Next Message | Hitoshi Harada | 2013-06-27 10:11:19 | Re: in-catalog Extension Scripts and Control parameters (templates?) |
Previous Message | Chris Farmiloe | 2013-06-27 09:49:25 | Re: ASYNC Privileges proposal |