Opened 8 years ago

Closed 8 years ago

#957 closed defect (fixed)

Database upgrade fails with postgres

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


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 (0)

Change History (5)

comment:1 Changed 8 years ago by anonymous

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

comment:2 Changed 8 years ago by bobbysmith007

I am looking into this

comment:3 Changed 8 years ago 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.


comment:4 Changed 8 years ago 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,


comment:5 Changed 8 years ago by anonymous

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

Add Comment

Modify Ticket

as closed The owner will remain bobbysmith007.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.