From: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: Testing extension upgrade scripts |
Date: | 2011-03-02 21:18:50 |
Message-ID: | 76B34B0B-2202-4956-B975-006AE6F9EDE8@kineticode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
You should blog this.
David
On Mar 2, 2011, at 11:58 AM, Tom Lane wrote:
> It occurred to me that it might be a good idea to describe how
> I've been testing extension upgrade scripts. So:
>
> 1. Install the 9.0 version of the module in an empty 9.0 database.
> pg_dump this database.
>
> 2. Load the pg_dump script into an empty 9.1 database, with the
> underlying shared library (if any) available in $libdir but not
> installed as SQL. (If this fails, probably you removed a C
> function from the library.)
>
> 3. Execute "CREATE EXTENSION whatever FROM unpackaged;". (If this
> fails, obviously you have work to do.)
>
> 4. pg_dump --binary-upgrade from the 9.1 database. (You need
> --binary-upgrade or pg_dump won't show the member objects of the
> extension.)
>
> 5. Install the 9.1 version of the extension in another empty
> database, using plain "CREATE EXTENSION whatever". Then
> pg_dump --binary-upgrade from that.
>
> 6. Diff the two 9.1 dump scripts. They should be the same except
> for OID and frozenxid numbers. If not, the upgrade script has
> missed something it needs to do to update the catalog entries.
>
>
> Of course, a similar approach will be useful for testing scripts
> that are meant to update from one extension version to another,
> once we arrive at the point of needing to do that.
>
> regards, tom lane
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
From | Date | Subject | |
---|---|---|---|
Next Message | Dimitri Fontaine | 2011-03-02 21:19:05 | Re: Sync Rep v17 |
Previous Message | Tom Lane | 2011-03-02 21:16:07 | Re: Sync Rep v17 |