Postgresql support is broken

Bug #1435941 reported by Abhilash Raj
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Mailman
Fix Released
Aurélien Bompard

Bug Description

The support for postgresql database backend is broken (I guess after the python3 port). The details of the failures can be found here with the continuous integration on gitlab

Related branches

Barry Warsaw (barry)
Changed in mailman:
milestone: none → 3.0.0
importance: Undecided → High
status: New → Triaged
Revision history for this message
Barry Warsaw (barry) wrote :

Ug. Lots of pg failures :(

Changed in mailman:
status: Triaged → Confirmed
importance: High → Critical
Revision history for this message
Barry Warsaw (barry) wrote :
Download full text (3.9 KiB)

Try running the following:

$ MAILMAN_EXTRA_TESTING_CFG=/home/barry/projects/mailman/postgres.cfg tox -e pg

where you replace the path to the postgres.cfg with one of your own as described in src/mailman/docs/START.rst

Pretty quickly we hit an exception:

ERROR: LayerSuite
Traceback (most recent call last):
  File "/home/barry/projects/mailman/trunk/.tox/pg/lib/python3.4/site-packages/sqlalchemy/engine/", line 1139, in _execute_context
  File "/home/barry/projects/mailman/trunk/.tox/pg/lib/python3.4/site-packages/sqlalchemy/engine/", line 442, in do_execute
    cursor.execute(statement, parameters)
psycopg2.ProgrammingError: column "id" does not exist
LINE 1: ...LECT setval('"domain_owner_id_seq"', coalesce(max("id"), 1),

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/barry/projects/mailman/trunk/src/mailman/testing/", line 207, in testTearDown
  File "/home/barry/projects/mailman/trunk/src/mailman/testing/", line 476, in reset_the_world
  File "/home/barry/projects/mailman/trunk/src/mailman/database/", line 123, in _reset
  File "/home/barry/projects/mailman/trunk/src/mailman/database/", line 49, in _post_reset
  File "/home/barry/projects/mailman/trunk/.tox/pg/lib/python3.4/site-packages/sqlalchemy/orm/", line 1023, in execute
    bind, close_with_result=True).execute(clause, params or {})
  File "/home/barry/projects/mailman/trunk/.tox/pg/lib/python3.4/site-packages/sqlalchemy/engine/", line 914, in execute
    return meth(self, multiparams, params)
  File "/home/barry/projects/mailman/trunk/.tox/pg/lib/python3.4/site-packages/sqlalchemy/sql/", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/barry/projects/mailman/trunk/.tox/pg/lib/python3.4/site-packages/sqlalchemy/engine/", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/home/barry/projects/mailman/trunk/.tox/pg/lib/python3.4/site-packages/sqlalchemy/engine/", line 1146, in _execute_context
  File "/home/barry/projects/mailman/trunk/.tox/pg/lib/python3.4/site-packages/sqlalchemy/engine/", line 1332, in _handle_dbapi_exception
  File "/home/barry/projects/mailman/trunk/.tox/pg/lib/python3.4/site-packages/sqlalchemy/util/", line 188, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=exc_value)
  File "/home/barry/projects/mailman/trunk/.tox/pg/lib/python3.4/site-packages/sqlalchemy/util/", line 181, in reraise
    raise value.with_traceback(tb)
  File "/home/barry/projects/mailman/trunk/.tox/pg/lib/python3.4/site-packages/sqlalchemy/engine/", line 1139, in _execute_context
  File "/home/barry/projects/...


Revision history for this message
Aurélien Bompard (abompard) wrote :

Alright I just linked to a branch with 4 commits fixing all the PostgreSQL issues. Please review, I may have left print statements in the code... ;-)

Revision history for this message
Barry Warsaw (barry) wrote :

Thanks! Looking over the diff I think I understand all the changes. I'm running the test suite now for both pg and sqlite.

The one change I don't understand is to the importer code. Why did you choose to do it this way instead of the old way?

Barry Warsaw (barry)
Changed in mailman:
assignee: nobody → Aurélien Bompard (abompard)
status: Confirmed → Fix Committed
Barry Warsaw (barry)
Changed in mailman:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.