[Bug 860159] Re: Mailman 3.0 support for Postgres

Barry Warsaw 860159 at bugs.launchpad.net
Tue Sep 27 03:03:38 CEST 2011

On Sep 27, 2011, at 12:44 AM, Stephen A. Goss wrote:

>I've attached a branch with the Postgres support code that I've cooked

Fantastic, thanks!  Do be sure to add a merge proposal.

>3. There is now an alternate mailman_pg.sql file which is used to create
>the tables. Currently, two foreign key constraints are commented out
>because those are violated in Mailman 3 (apparently this doesn't bother
>SQLite). Some column TYPES are different from mailman.sql. Classes are
>created in a slightly different order due to FK constraint creation
>requires the referenced table to actually exist. The primary key indexes
>defined after each class are probably redundant, as those are created
>automatically for SERIAL columns defined as PRIMARY KEY in Postgres.

Do you have any thoughts on whether the two .sql files can possibly be shared?
My biggest concern is that it will be difficult-ish to keep them in sync as I
add or modify the SQLite version.  If it's not possible, so be it.

I took a quick look at the Python changes, and I think I'm going to refactor
the code to not hardcode so much in stock.py.  For example, I'll probably
rename StockDatabase to SQLiteDatabase and add a PostgresDatabase class,
adding a common super class.  That way, you'd only need to put this in your
mailman.cfg file:

class: mailman.database.postgres.PostgresDatabase

Don't worry about that too much, I can make that change when I merge your

>4. Probably more FK constraint violations exist that my tests haven't

I'd definitely like to be able to run the test suite against Postgres, if even
for now it's a manual select (e.g. because Postgres would obviously have to be
installed and configured in order to work).

You received this bug notification because you are a member of Mailman
Coders, which is subscribed to GNU Mailman.

  Mailman 3.0 support for Postgres

To manage notifications about this bug go to:

More information about the Mailman-coders mailing list