Proposal to fix postgresql package maintainance nightmare

Michelle Sullivan michelle at sorbs.net
Sat Aug 15 14:53:06 UTC 2015


Matthew Seaman wrote:
> On 04/08/2015 12:33, Kimmo Paasiala wrote:
>   
>> On Tue, Aug 4, 2015 at 1:07 PM, Michael Grünewald <michipili at gmail.com> wrote:
>>     
>>>> On 21 Jul 2015, at 11:46, Baptiste Daroussin <bapt at freebsd.org> wrote:
>>>> - Impossible to have tools from both old and new version at the same time (which
>>>> is necessary to upgrade db and prepare upgrades of db) …
>>>>         
>>> Could not jails be used to solve these issues by running the two (…) required versions
>>> in jailed environments?  There is a little bit of setup, but if by any chance you
>>> are using some variation of the immutable server pattern, it should stay very low.
>>>
>>>       
>> You can't ask an average FreeBSD user who just wants to upgrade
>> his/her PostgreSQL installation to set up jails that would be only
>> used for one task. The upgrade should be achievable with just 'pkg
>> upgrade' without any extra work.
>>     
>
> It's unlikely that 'pkg upgrade' would ever grow the facility to
> automatically do a fast binary update of the data directory from one
> postgresql release to another one.
>
> However, being able to install things in such a way that pg_upgrade(1)
> could be used to do all that would be very much more useful than the
> current 'dump databases ; upgrade packages ; reload databases' fandango.
>   

I'm just doing this - 8.4 -> 9.4 and 9.0 -> 9.4 on some machines...

Its not that difficult to get pg_upgrade working...  Don't know under
pkgng, but under pkg_* tools and my mangled ports tree to make it to
continue to work with pkg_* tools I just did this:

( cd /usr/ports/databases/postgresql90-server &&
LOCALBASE=/usr/local.upgrade PKG_DBDIR=/var/db/pkg.upgrade make install )

..to get the current version installed in it's own little environment,
then shut the server down, deinstalled the existing 9.0 (using
pkg_delete ) and installed 9.4 normally using '( cd
/usr/ports/databases/postgresql94-server && make install )'

and now I can use pkg_upgrade ...

My failing point is ip4r 1.x -> 2.x but that's a completely separate
issue in many ways... (and has it's own solutions).

Regards,

-- 
Michelle Sullivan
http://www.mhix.org/



More information about the freebsd-ports mailing list