Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#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 Russ Tyndall

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.

comment:2 Changed 10 years ago by Ryan J Ollos

Cc: Ryan J Ollos added

comment:3 Changed 10 years ago by Russ Tyndall

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

Last edited 10 years ago by Ryan J Ollos (previous) (diff)

comment:4 Changed 10 years ago by Russ Tyndall

Resolution: fixed
Status: newclosed

In 14426:

fixing report Primary Key bugs 1.4.6 fix #12010 fix #12191

comment:5 Changed 10 years ago by Russ Tyndall

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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Russ Tyndall.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.