Re: Generalized concept of modules

From: PFC <lists(at)peufeu(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Martijn van Oosterhout" <kleptog(at)svana(dot)org>
Cc: "Marko Kreen" <markokr(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Generalized concept of modules
Date: 2006-06-03 08:06:03
Message-ID: op.taj8sdifcigqcu@apollo13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


Think about version API compatibility.

Suppose you have a working database on server A which uses module foo
version 1.
Some time passes, you buy another server B and install postgres on it.
Meanwhile the module foo has evolved into version 2 which is cooler, but
has some minor API incompatibilities.
You dump the database on server A and reload it on server B. pg_dump
issues an INSTALL MODULE which installs foo version 2 on the new server.
Due to the "minor API incompatibilities", your database breaks.

It's really cool not to pollute the dumps (and the global namespace...)
with all the module functions, however implementing module functionality
can be tricky.

So don't forget about versions and possible incompatibilities ; also
versions means you might need an UPGRADE MODULE which does more than
uninstall + reinstall. Suppose a module has created some tables for its
use, these shouldn't be dumped when upgrading to a new version ; however
maybe the new version will want to add a column...

Think gentoo portage, for instance.
This excellent package system is a lot more evolved than the module
system needs to be, but having a look at the feature list would be a good
inspiration maybe.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message PFC 2006-06-03 08:16:33 Re: COPY (query) TO file
Previous Message Oleg Bartunov 2006-06-03 06:13:46 Re: Connection Broken with Custom Dicts for TSearch2

Browse pgsql-patches by date

  From Date Subject
Next Message Victor Snezhko 2006-06-03 10:01:57 fix for incorrect russian translation
Previous Message Tom Lane 2006-06-03 02:53:33 Re: quick patch for pg_database.encoding doc