Skip site navigation (1) Skip section navigation (2)

Re: Upgrading Extension, version numbers (was: Extensions, patch v16)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
Cc: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>, Robert Haas <robertmhaas(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, David Fetter <david(at)fetter(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Upgrading Extension, version numbers (was: Extensions, patch v16)
Date: 2011-01-03 19:42:25
Message-ID: 23428.1294083745@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
"David E. Wheeler" <david(at)kineticode(dot)com> writes:
> On Dec 29, 2010, at 2:01 PM, Dimitri Fontaine wrote:
>> At the time you tell PostgreSQL about the new extension, the shared
>> object file has been in place for some time already, and the upgrade SQL
>> script has not been ran yet.

> That sounds dangerous.

It is, but I don't see any alternative.  As Dimitri said, the .so will
typically be installed by a packaging system, so we don't have any
opportunity to run SQL code beforehand.  In any case ...

> The new .so should not be installed until the upgrade is been run.

... that flat out doesn't work.  If the upgrade script tries to add
functions that didn't exist in the old .so, it'll fail.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: David E. WheelerDate: 2011-01-03 19:43:43
Subject: Re: Upgrading Extension, version numbers (was: Extensions, patch v16)
Previous:From: Robert HaasDate: 2011-01-03 19:26:28
Subject: Re: back branches vs. VS 2008

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group