Code

Opened 4 years ago

Closed 4 years ago

#13821 closed (fixed)

Tests don't pass on python2.4 and 2.5 on postgresql

Reported by: PaulM Owned by: PaulM
Component: Database layer (models, ORM) Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Trunk r13400 on Ubuntu 8.04, python2.5 (or 2.4) with psycopg2 (or backends.postgresql) on PostgreSQL 8.3.

The test suite doesn't pass, with errors related to database flushing failures. Running one of the problem tests individually (modeltests.unmanaged_models) returns a different set of errors suggesting that some objects are not getting properly saved to the DB, so the flush command can't remove them and throws the error.

This problem with saving doesn't seem to be universal, as most of the tests do pass.

I'll continue to work on figuring out exactly why this is failing.

Attachments (2)

pg_fix_get_serial_sequence.diff (2.5 KB) - added by PaulM 4 years ago.
13832.diff (3.5 KB) - added by DrMeers 4 years ago.
Uses quote_name, and includes specific regression tesf for uppercase characters in app names

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by PaulM

comment:1 Changed 4 years ago by PaulM

  • Component changed from Testing framework to Database layer (models, ORM)
  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Status changed from new to assigned
  • Triage Stage changed from Unreviewed to Accepted

cramm on #django-dev tracked the problem down. Calls to pg_get_serial_sequence have an odd behavior and need another layer of quotes to retain capitalization.

More notes on that here:
http://archives.postgresql.org/pgsql-hackers/2004-10/msg00964.php
http://archives.postgresql.org/pgsql-bugs/2007-01/msg00099.php

The attached patch passes the full test suite on the reported system as well as on python2.6 with PostgreSQL 8.4.

Changed 4 years ago by DrMeers

Uses quote_name, and includes specific regression tesf for uppercase characters in app names

comment:2 Changed 4 years ago by russellm

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [13450]) Fixed #13821 -- Added a double-quoting to the PostgreSQL sequence reset code. Thanks to PaulM for the report, and to PaulM and Simon Meers for their work on the patch.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.