Re: BUG #13581: pg_dump omits extension versions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: nickbarnes01(at)gmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #13581: pg_dump omits extension versions
Date: 2015-08-20 13:51:41
Message-ID: 17233.1440078701@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

nickbarnes01(at)gmail(dot)com writes:
> pg_dump does not include a VERSION clause in CREATE EXTENSION
> statements.

That is by design. pg_dump does not try to force you to reload the
data into the same server version either. The expectation is that
you may want to load the data into a newer server version, and the
same would go for extensions.

> This can cause the restore to fail, if for example the structure of the
> extension's configuration tables has changed, or the database has
> dependencies on a dropped function, type, etc.

If some extension has broken compatibility with its own previous versions
that badly, I would say you have a gripe to file with the extension's
author, not us.

In any particular case you could presumably work around it by temporarily
changing the extension's default version in the new installation. But
even then, how could ALTER EXTENSION UPDATE work, if there are such
incompatibilities between its older and newer versions?

The core server code goes to very great lengths to ensure that pg_dump
scripts from older server versions will load into newer ones. I do not
see why we should expect differently from extension authors.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2015-08-20 14:02:50 Re: BUG #13580: Fix namespace handling in xpath function, current functions collision
Previous Message nickbarnes01 2015-08-20 12:22:33 BUG #13581: pg_dump omits extension versions