Project

General

Profile

Actions

Bug #4832

closed

Bug #4831: Reports cannot be inserted into postgresql due to a limit on ids

Add migration script about table ids

Added by Vincent MEMBRÉ over 10 years ago. Updated over 10 years ago.

Status:
Released
Priority:
1 (highest)
Assignee:
Jonathan CLARKE
Category:
System integration
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

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"
Actions #1

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
Actions #2

Updated by François ARMAND over 10 years ago

  • Description updated (diff)
Actions #3

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.

Actions #4

Updated by Nicolas CHARLES over 10 years ago

  • Description updated (diff)

I updated the description of the ticket

Actions #5

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
Actions #6

Updated by Jonathan CLARKE over 10 years ago

  • Status changed from Pending technical review to Discussion
  • Assignee changed from Jonathan CLARKE to Nicolas CHARLES
Actions #7

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

Actions #8

Updated by Jonathan CLARKE over 10 years ago

  • Assignee changed from Jonathan CLARKE to Nicolas CHARLES
Actions #9

Updated by Nicolas CHARLES over 10 years ago

  • Assignee changed from Nicolas CHARLES to Jonathan CLARKE

PR has been updated

Actions #10

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.

Actions #11

Updated by Jonathan CLARKE over 10 years ago

Applied in changeset packages:commit:dfc66e675e515ebce0f6dc718efc0ed9ca57f5f0.

Actions #12

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:

Actions

Also available in: Atom PDF