Re: Review: extension template

Поиск
Список
Период
Сортировка
От Dimitri Fontaine
Тема Re: Review: extension template
Дата
Msg-id m2wqp2p2r5.fsf@2ndQuadrant.fr
обсуждение исходный текст
Ответ на Re: Review: extension template  (Markus Wanner <markus@bluegap.ch>)
Ответы Re: Review: extension template  (Markus Wanner <markus@bluegap.ch>)
Список pgsql-hackers
Markus Wanner <markus@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 enough, with a single
module version per major version of PostgreSQL. Meaning for all the
clusters on the server, and all the databases in them.

We want to be able to have postgis 1.5 and 2.x installed in two
different databases in the same cluster, don't we?

Well the current patch we still can't because of the dynamically shared
object side of things, but that's not a good reason to impose the same
limitation on to the "template" idea.

>           Currently, while allowing an upload, it seems far from simple,
> but adds quite a bit of unwanted complexity. If all I want is to upload
> code for an extension via libpq, I don't want to deal with nifty
> distinctions between templates and extensions.
>
> Just my opinion, though. Maybe I'm still missing something.

Yes: dump & restore.

After playing around with several ideas around that in the past two
development cycles, the community consensus clearly is that "extensions"
are *NEVER* going to be part of your dump scripts.

Now when using templates you have no other source to install the
extensions from at pg_restore time, given what I just said.

The whole goal of the "template" idea is to offer a way to dump and
restore the data you need for CREATE EXTENSION to just work at restore
time, even when you sent the data over the wire.

Current extension are managed on the file system, the contract is that
it is the user's job to maintain and ship that, externally to PostgreSQL
responsibilities. All that PostgreSQL knows about is to issue the CREATE
EXTENSION command at pg_restore time.

With templates or in-line extensions, the contract is that the user asks
PostgreSQL to manage its extensions in the same way it does for the
other objects on the system. The design we found to address that is
called "Extension Templates" and is implemented in the current patch.

Regards,
-- 
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robins Tharakan
Дата:
Сообщение: Re: Add regression tests for DISCARD
Следующее
От: Szymon Guz
Дата:
Сообщение: Re: [COMMITTERS] pgsql: PL/Python: Convert numeric to Decimal