Re: REVIEW: Extensions support for pg_dump

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: Anssi Kääriäinen <anssi(dot)kaariainen(at)thl(dot)fi>
Cc: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: REVIEW: Extensions support for pg_dump
Date: 2011-01-18 10:49:03
Message-ID: 87zkqywkps.fsf@hi-media-techno.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Anssi Kääriäinen <anssi(dot)kaariainen(at)thl(dot)fi> writes:
> The only question here is should CREATE OR REPLACE be allowed. I just

Yes. Think ALTER EXTENSION UPGRADE, the next patch in the series
(already proposed for this CF too).

> realized this could present a new problem. If I am not mistaken, when
> loading from dump, you suddenly get the extension's version back, not the
> one you defined in CREATE OR REPLACE. If this is the case, this should NOT
> be allowed. And by the same reasoning, ALTER FUNCTION [anything] should not
> be allowed either. Or at least then the function/(or any object for that
> matter) should be restored somehow from the backup, not from the extension
> files.

Well ideally those will get into extension's upgrade scripts, not be
typed interactively by superusers. But I don't think we should limit
the capability of superusers to quickly fix a packaging mistake…

> I still haven't had the time to start pg_dump reviewing, so I haven't
> verified if this is really a problem. But I suspect so...

Both a problem when badly used and a good thing to have sometime, as in
the upgrade scripts :)
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Anssi Kääriäinen 2011-01-18 10:49:35 Re: REVIEW: Extensions support for pg_dump
Previous Message Cédric Villemain 2011-01-18 10:33:09 Re: pg_basebackup for streaming base backups