Bug #4832
closedBug #4831: Reports cannot be inserted into postgresql due to a limit on ids
Add migration script about table ids
Description
Since #4831, type of reports have changed from integer to bigint.
We will not migrate table automatically: it can take a very long time to perform and therefore could not fit in an automatic migration script.
We will provide a script available in /opt/rudder/... that will make the migration whenever the user is ok to run it.
In the migration process we will check if there is a still a table that needs migration and warn the user that there is something he can do!
there is 3 tables to look at : ruddersysevents (id), archivedruddersysevents (id), and statusUpdated (lastId)
The process to update reports table is more complicated:
- Ask if the user wish to keep all the previous reports or not
- if not keeping the previous reports, ask confirmation
- In a transaction:
- Rename table to old_table
- drop all indexes except the index on nodes
- create new "table" with bigint as id
- Outside the transaction:
- create new indexes on the new table
- If the user wish to keep all reports
- copy everything
- If the user does not wish to keep all reports
- copy latest 1000 reports of each node in the table
- the copy is node by node, with display of the amout of node copied, and reports are dropped each time a copy is made
- Drop "old_table"
- copy latest 1000 reports of each node in the table
Updated by Vincent MEMBRÉ over 10 years ago
- Status changed from New to Pending technical review
- Assignee changed from Vincent MEMBRÉ to Jonathan CLARKE
- Pull Request set to https://github.com/Normation/rudder-packages/pull/316
Updated by Vincent MEMBRÉ over 10 years ago
- Subject changed from Add migration script to alter table if type of id is integer to Add migration script about table ids
- Description updated (diff)
- Status changed from Pending technical review to New
- Assignee changed from Jonathan CLARKE to Vincent MEMBRÉ
- Target version changed from 2.6.13 to 2.10.1
- Pull Request deleted (
https://github.com/Normation/rudder-packages/pull/316)
I updated the description with the new objective of that issue.
Set me as assignee for the moment.
Updated by Nicolas CHARLES over 10 years ago
- Description updated (diff)
I updated the description of the ticket
Updated by Nicolas CHARLES over 10 years ago
- Status changed from New to Pending technical review
- Assignee changed from Vincent MEMBRÉ to Jonathan CLARKE
- Pull Request set to https://github.com/Normation/rudder-packages/pull/319
Updated by Jonathan CLARKE over 10 years ago
- Status changed from Pending technical review to Discussion
- Assignee changed from Jonathan CLARKE to Nicolas CHARLES
Updated by Nicolas CHARLES over 10 years ago
- Status changed from Discussion to Pending technical review
- Assignee changed from Nicolas CHARLES to Jonathan CLARKE
PR updated
Updated by Jonathan CLARKE over 10 years ago
- Assignee changed from Jonathan CLARKE to Nicolas CHARLES
Updated by Nicolas CHARLES over 10 years ago
- Assignee changed from Nicolas CHARLES to Jonathan CLARKE
PR has been updated
Updated by Nicolas CHARLES over 10 years ago
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset packages:commit:c9a9fc4811395a2bce1a9713fce9eb05ea54f4e0.
Updated by Jonathan CLARKE over 10 years ago
Applied in changeset packages:commit:dfc66e675e515ebce0f6dc718efc0ed9ca57f5f0.
Updated by Vincent MEMBRÉ over 10 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 2.10.1, which was released today.
Check out:
- The release announcement: http://www.rudder-project.org/pipermail/rudder-announce/2014-June/000087.html
- The full ChangeLog: http://www.rudder-project.org/foswiki/bin/view/System/Documentation:ChangeLog27
- Download information: https://www.rudder-project.org/site/get-rudder/downloads/