#12010 closed defect (fixed)
should increase report_id_seq after instalation
Reported by: | anonymous | Owned by: | Russ Tyndall |
---|---|---|---|
Priority: | low | Component: | TimingAndEstimationPlugin |
Severity: | normal | Keywords: | postgress |
Cc: | Ryan J Ollos | Trac Release: | 1.0 |
Description
With postgress as a database Plugin creates new queries but report_id_seq is not increased, now when user tries adding new custom query trac fails due to
We need: SELECT setval('trac.report_id_seq', (SELECT MAX(id) FROM trac.report));
Maybe rather than a plugin it is trac who should increase report_id_seq after adding new report.
Attachments (0)
Change History (5)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Cc: | Ryan J Ollos added |
---|
comment:3 Changed 10 years ago by
I am aware of this and will try to fix it shortly. In the mean time I think a work around is to keep saving till it works. The problem is that the "Serial/auto_increment" column is not updated correctly when we create the reports in the latest trac. Each insert attempts to update it by 1, so that eventually you get to where it was supposed to be. Not great, but at least should allow you to work around it.
see:#12191
comment:5 Changed 10 years ago by
Thanks. Do I need any database fixes after these bugfixes?
If the sequences are still broken, then yes, but you can either keep saving till it works (about 8-10 times) or run the sequence update from #12010.
Previously trac were not using auto_increment / sequences and so the sequence didnt need to be updated (it was using explicit key calculation - as this plugin does and the example above). I guess in the intervening years someone "improved" the situation.
I will attempt to update the sequence if it exists I suppose.