Re: [HACKERS] Review: extension template

2013-07-13 Thread Dimitri Fontaine
Hi, Please find attached a new version (v10) of the patch that fixes the reported dependencies problems and add some new regression tests to cover them. The patch implements the solution we discuted privately with Markus while at the CHAR(13) conference: - create template for extension is now

Re: [HACKERS] Review: extension template

2013-07-10 Thread Markus Wanner
Peter, On 07/09/2013 11:04 PM, Peter Eisentraut wrote: I think there is an intrinsic conflict here. You have things inside the database and outside. When they depend on each other, it gets tricky. Extensions were invented to copy with that. They do the job, more or less. I agree. And to

Re: [HACKERS] Review: extension template

2013-07-09 Thread Dimitri Fontaine
Markus Wanner mar...@bluegap.ch writes: Then what happens at pg_restore time? the CREATE EXTENSION in the backup script will suddenly install the other extension's that happen to have the same name? I think erroring out is the only safe way here. Extensions are commonly identified by name

Re: [HACKERS] Review: extension template

2013-07-09 Thread Markus Wanner
Dimitri, leaving the template vs link model aside for a moment, here are some other issues I run into. All under the assumption that we want the link model. On 07/08/2013 11:49 AM, Dimitri Fontaine wrote: Please find attached to this mail version 9 of the Extension Templates patch with fixes

Re: [HACKERS] Review: extension template

2013-07-09 Thread Dimitri Fontaine
Markus Wanner mar...@bluegap.ch writes: First of all, I figured that creation of a template of a newer version is prohibited in case an extension exists: Ooops, that's a bug I need to fix. I then came to think of the upgrade scripts... what do we link against if an extension has been created

Re: [HACKERS] Review: extension template

2013-07-09 Thread Markus Wanner
Salut Dimitri, On 07/09/2013 12:40 PM, Dimitri Fontaine wrote: Markus Wanner mar...@bluegap.ch writes: Or how do you think would pg_restore fail, if you followed the mental model of the template? # create template for extension foo version 'x' as ''; # create extension foo; # alter

Re: [HACKERS] Review: extension template

2013-07-09 Thread Peter Eisentraut
On 7/8/13 4:20 AM, Dimitri Fontaine wrote: Let me stress that the most important value in that behavior is to be able to pg_restore using a newer version of the extension, the one that works with the target major version. When upgrading from 9.2 to 9.3 if you depend on keywords that now are

Re: [HACKERS] Review: extension template

2013-07-08 Thread Heikki Linnakangas
On 08.07.2013 00:48, Markus Wanner wrote: On 07/07/2013 09:51 PM, Dimitri Fontaine wrote: The design we found to address that is called Extension Templates and is implemented in the current patch. I placed my concerns with the proposed implementation. It's certainly not the only way how

Re: [HACKERS] Review: extension template

2013-07-08 Thread Hannu Krosing
On 07/08/2013 09:26 AM, Heikki Linnakangas wrote: On 08.07.2013 00:48, Markus Wanner wrote: On 07/07/2013 09:51 PM, Dimitri Fontaine wrote: The design we found to address that is called Extension Templates and is implemented in the current patch. I placed my concerns with the proposed

Re: [HACKERS] Review: extension template

2013-07-08 Thread Dimitri Fontaine
On 07/08/2013 09:26 AM, Heikki Linnakangas wrote: I'm just now dabbling back to this thread after skipping a lot of discussion, and I'm disappointed to see that this still seems to be running in circles on the same basic question: What exactly is the patch trying to accomplish. Bypassing the

Re: [HACKERS] Review: extension template

2013-07-08 Thread Markus Wanner
On 06/10/2013 09:43 PM, Hannu Krosing wrote: On 07/08/2013 09:26 AM, Heikki Linnakangas wrote: The concept was useful, but not something we want to call an extension, because the distinguishing feature of an extension is that it lives outside the database and is *not* included in pg_dump.

Re: [HACKERS] Review: extension template

2013-07-08 Thread Markus Wanner
On 07/08/2013 10:20 AM, Dimitri Fontaine wrote: Bypassing the file system entirely in order to install an extension. As soon as I figure out how to, including C-coded extensions. Do I understand correctly that you want to keep the extensions (or their templates) out of the dump and require the

Re: [HACKERS] Review: extension template

2013-07-08 Thread Dimitri Fontaine
Hi, Please find attached to this mail version 9 of the Extension Templates patch with fixes for the review up to now. Markus Wanner mar...@bluegap.ch writes: I still think that we shouldn't allow creating a template for an extension that is already installed, though. Do you have any

Re: [HACKERS] Review: extension template

2013-07-08 Thread Markus Wanner
Hello Dimitri, On 07/08/2013 11:49 AM, Dimitri Fontaine wrote: Please find attached to this mail version 9 of the Extension Templates patch with fixes for the review up to now. Thanks, cool. Markus Wanner mar...@bluegap.ch writes: I still think that we shouldn't allow creating a template

Re: [HACKERS] Review: extension template

2013-07-07 Thread Markus Wanner
Salut Dimitri, On 07/06/2013 10:30 PM, Dimitri Fontaine wrote: Yes, I did share this viewpoint over the naming of the feature, but Tom insisted that we already have those kind of templates for text search. I think it's a question of what mental model we want extensions to follow. See my other

Re: [HACKERS] Review: extension template

2013-07-07 Thread Markus Wanner
On 07/06/2013 10:30 PM, Dimitri Fontaine wrote: I still think that we shouldn't allow creating a template for an extension that is already installed, though. Do you have any suggestions for a better error message? Oh, I just realize that pg_extension_{template,control,uptmpl} are not SHARED

Re: [HACKERS] Review: extension template

2013-07-07 Thread Markus Wanner
On 07/07/2013 02:55 PM, Markus Wanner wrote: If you want to just upload extensions to a database via libpq.. Let's rephrase this in a (hopefully) more constructive way: I get the impression you are trying to satisfy many different needs. Way more that you need to scratch your own itch. To the

Re: [HACKERS] Review: extension template

2013-07-07 Thread Dimitri Fontaine
Markus Wanner mar...@bluegap.ch writes: Oh, I just realize that pg_extension_{template,control,uptmpl} are not SHARED catalogs, but you need to install the template per-database and then need to enable it - per-database *again*. Why is that? Because the current model is not serving us well

Re: [HACKERS] Review: extension template

2013-07-07 Thread Markus Wanner
Hello Dimitri, On 07/07/2013 09:51 PM, Dimitri Fontaine wrote: Markus Wanner mar...@bluegap.ch writes: Oh, I just realize that pg_extension_{template,control,uptmpl} are not SHARED catalogs, but you need to install the template per-database and then need to enable it - per-database *again*.

Re: [HACKERS] Review: extension template

2013-07-06 Thread Dimitri Fontaine
Hi, Thanks a lot for your detailed review! Markus Wanner mar...@bluegap.ch writes: Initially, I was confused about what the patch is supposed to achieve. The 'template' naming certainly contributed to that confusion. My mental Yes, I did share this viewpoint over the naming of the feature,

[HACKERS] Review: extension template

2013-07-05 Thread Markus Wanner
Hi, I reviewed Dimitri's work on extension templates [2]. There's some discussion still ongoing and the patch has gone through several revisions since its addition to the current CF. The patch has already been marked as 'returned with feedback', and I can support that resolution (for this CF). I

Re: [HACKERS] Review: extension template

2013-07-05 Thread Markus Wanner
On 07/05/2013 09:05 PM, Markus Wanner wrote: The patch has already been marked as 'returned with feedback', and I can support that resolution (for this CF). Oops.. I just realize it's only set to waiting on author, now. I guess I confused the two states. Please excuse my glitch. Dimitri, do