Opened 18 years ago
Closed 18 years ago
#957 closed defect (fixed)
Database upgrade fails with postgres
Reported by: | anonymous | Owned by: | Russ Tyndall |
---|---|---|---|
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 (0)
Change History (5)
comment:1 Changed 18 years ago by
comment:3 Changed 18 years ago by
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
comment:4 Changed 18 years ago by
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
comment:5 Changed 18 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
I have exactly the same problem with postgres and the latest 0.10 stable