Ticket #957 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

Database upgrade fails with postgres

Reported by: anonymous Assigned to: bobbysmith007
Priority: normal Component: TimingAndEstimationPlugin
Severity: major Keywords:
Cc: Trac Release: 0.10

Description

trac-admin /var/trac/myproject upgrade --no-backup Timing and Estimation needs an upgrade Upgrading Database Beginning DB Upgrade Creating bill_date table Command failed: current transaction is aborted, commands ignored until end of transaction block

Attachments

Change History

12/03/06 03:17:19 changed by anonymous

I have exactly the same problem with postgres and the latest 0.10 stable

12/04/06 19:22:49 changed by bobbysmith007

I am looking into this

12/04/06 19:51:04 changed by bobbysmith007

I don't really see anything wrong, and I thought other people had by this point successfully installed this under postgres. My guess is that there is something going on with the connection to the database.

Other than that it is possible that I need to be opening transactions or something when using the python postgres connection. I have been working a little bit here an there getting a postgres db up and running so that i can get trac running on it. I have not successfully done this yet, but I do have a test database I can execute sql against, and neither statement fails when executed directly against the database.


After some further poking and prodding in IPython I get that same error message when trying to use the pgdb module. I am looking into how to fix this.

Russ

12/04/06 20:50:41 changed by bobbysmith007

I really wish dbapi2 was actually a standard. I have had to change my db handling code for every database that is used. I found that if you select but then never commit that select (as if that makes sense), it causes subsequent connections to have an "aborted transaction" or some such.

The solution seems to be commit after every successful use of connection (even selects).

I have added code to my database code to perform this commit. Hopefully this will solve the problems that you all are having getting this installed. You should just need to get the latest version and then trac upgrade again. If you are still having problems, let me know and I will try to find a better solution to this.

see changeset:1626

Sorry for the inconvenience,

Russ

12/11/06 15:00:22 changed by anonymous

  • status changed from new to closed.
  • resolution set to fixed.

Add/Change #957 (Database upgrade fails with postgres)




Change Properties
Action