[Pkg-dspam-misc] dspam 3.9 database upgrade : fix for the postgesql backend.

Philippe Le Brouster plb at nebkha.net
Thu Apr 1 18:15:32 UTC 2010


Hi,

Le Thursday 1 April 2010 à 19:07 +0200, Julien Valroff a écrit:
> The only thing I can see in the UPGRADING file is the following
> statement:
> 2. Ensure PosgreSQL is using the new database schema. The following clauses should
>    be executed for upgrading pre-3.9.0 DSPAM PosgreSQL schema to the 3.9.0 schema:
>      ALTER TABLE dspam_preferences ALTER COLUMN uid TYPE integer;
>      ALTER TABLE dspam_signature_data ALTER COLUMN uid TYPE integer;
>      ALTER TABLE dspam_stats ALTER COLUMN uid TYPE integer;
>      ALTER TABLE dspam_token_data ALTER COLUMN uid TYPE integer;
>      DROP INDEX IF EXISTS id_token_data_sumhits;
> 
>    If you are using virtual users in DSPAM, then you should execute the following
>    clause for upgrading pre-3.9.0 DSPAM virtual uids to the 3.9.0 schema:
>      ALTER TABLE dspam_virtual_uids ALTER COLUMN uid TYPE integer;
> 
> It is already present in debian/sqlfiles/upgrade/pgsql/3.8
> This file should actually be renamed to 3.9 - I had added it before the
> official 3.9.0 release - but this should not cause any issue anyway, as
> the dbconfig-commong documentation states:
> "when a package upgrade occurs, all instances of VERSION which are newer
> than the previously installed version will be applied, in order"
> 
> Would you please explain what your patch makes, and where have you seen
> that it is necessary to be run?
> Sorry if that might seem idiot questions, but I must say I haven't
> worked on this for a quite long time now, and I am not a pgsql person ;)

It seems that the UPGRADING file is not up to date because it didn't
mention the update from 3.8 to 3.9. In the dspam repository, the
postgresql scheme between 3.8 and 3.9 has changed. You can check this
with :

  $ git clone git://dspam.git.sourceforge.net/gitroot/dspam/dspam
  $ cd dspam
  $ git diff origin/RELENG_3_8 origin/RELENG_3_9  src/tools.pgsql_drv/pgsql_objects.sql
    (diff output attached)

So my patch just add the creation of the postgresql function
'lookup_tokens(integer,integer,bigint[])'.

Currently, after a fresh installation of dspam 3.9 with the debian
packages, this function is created. After an upgrade from dspam 3.6.8-9,
this function is missing.

> I also take the leave to re-raise a ***CALL FOR HELP*** as it seems I am
> the only one to work on trying to get DSPAM packages for Debian, but I
> do not have all the required skills to achieve this alone.

What is needed to be done before uploading dspam 3.9 in the debian
archive ?

Cheers,

Philippe.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dspam_3.8_3.9.diff
Type: text/x-diff
Size: 3577 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-dspam-misc/attachments/20100401/7828301f/attachment.diff>


More information about the Pkg-dspam-misc mailing list